Skip to content

Commit

Permalink
fix(sqlglot): handle new nullable type field
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Aug 19, 2024
1 parent c15cc61 commit 101fc8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ibis/backends/sql/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,12 @@ class ClickHouseType(SqlglotType):
@classmethod
def from_ibis(cls, dtype: dt.DataType) -> sge.DataType:
typ = super().from_ibis(dtype)

if typ.this == typecode.NULLABLE:
return typ

Check warning on line 1060 in ibis/backends/sql/datatypes.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/sql/datatypes.py#L1060

Added line #L1060 was not covered by tests

# nested types cannot be nullable in clickhouse
typ.args["nullable"] = False
if dtype.nullable and not (
dtype.is_map() or dtype.is_array() or dtype.is_struct()
):
Expand Down

0 comments on commit 101fc8e

Please sign in to comment.