Skip to content

Commit

Permalink
feat(mssql): add datatype mapping for hierarchyid (#8397)
Browse files Browse the repository at this point in the history
  • Loading branch information
gforsyth authored Feb 20, 2024
1 parent 64af56a commit 2fd2c30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ibis/backends/base/sqlglot/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,8 @@ def _from_sqlglot_STRUCT(cls, *cols: sge.ColumnDef) -> NoReturn:
class MSSQLType(SqlglotType):
dialect = "mssql"

unknown_type_strings = FrozenDict({"hierarchyid": dt.string})

@classmethod
def _from_sqlglot_BIT(cls):
return dt.Boolean(nullable=cls.default_nullable)
Expand Down
1 change: 1 addition & 0 deletions ibis/backends/mssql/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
("DATETIMEOFFSET(5)", dt.timestamp(scale=5, timezone="UTC")),
("GEOMETRY", dt.geometry),
("GEOGRAPHY", dt.geography),
("HIERARCHYID", dt.string),
]


Expand Down

0 comments on commit 2fd2c30

Please sign in to comment.