Skip to content

Commit

Permalink
fix(mssql): support new sqlglot temporal types
Browse files Browse the repository at this point in the history
  • Loading branch information
IndexSeek committed Dec 13, 2024
1 parent 5981e08 commit 0255684
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ibis/backends/sql/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
# XML = auto()
}

if sg.__version_tuple__[0] >= 26:
_from_sqlglot_types |= {
typecode.DATETIME2: dt.Timestamp,
typecode.SMALLDATETIME: dt.Timestamp,
}

_to_sqlglot_types = {
dt.Null: typecode.NULL,
dt.Boolean: typecode.BOOLEAN,
Expand Down

0 comments on commit 0255684

Please sign in to comment.