Skip to content

Commit

Permalink
fix(druig): convert type strings to lowercase before looking up
Browse files Browse the repository at this point in the history
  • Loading branch information
kszucs committed Aug 24, 2023
1 parent 14dfbe0 commit 9c47033
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ibis/backends/base/sql/glot/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def from_ibis(cls, dtype: dt.DataType) -> sge.DataType:

@classmethod
def from_string(cls, text: str, nullable: bool | None = None) -> dt.DataType:
if dtype := cls.unknown_type_strings.get(text):
if dtype := cls.unknown_type_strings.get(text.lower()):
return dtype

sgtype = sg.parse_one(text, into=sge.DataType, read=cls.dialect)
Expand Down Expand Up @@ -355,8 +355,8 @@ class TrinoType(SqlglotType):

unknown_type_strings = FrozenDict(
{
"INTERVAL YEAR TO MONTH": dt.Interval("M"),
"INTERVAL DAY TO SECOND": dt.Interval("ms"),
"interval year to month": dt.Interval("M"),
"interval day to second": dt.Interval("ms"),
}
)

Expand Down

0 comments on commit 9c47033

Please sign in to comment.