Skip to content

Commit

Permalink
feat(datatypes): convert money and small money datatype to decimal da…
Browse files Browse the repository at this point in the history
…tatype (#8556)
  • Loading branch information
jitingxu1 authored Mar 6, 2024
1 parent cbeb6cf commit ecc5d70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ibis/backends/mssql/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
("DECIMAL", dt.Decimal(precision=18, scale=0)),
("DECIMAL(5, 2)", dt.Decimal(precision=5, scale=2)),
("INT", dt.int32),
("MONEY", dt.int64),
("MONEY", dt.Decimal(19, 4)),
("NUMERIC", dt.Decimal(18, 0)),
("NUMERIC(10,5)", dt.Decimal(10, 5)),
("NUMERIC(14,3)", dt.Decimal(14, 3)),
("SMALLINT", dt.int16),
("SMALLMONEY", dt.int32),
("SMALLMONEY", dt.Decimal(10, 4)),
("TINYINT", dt.int8),
# Approximate numerics
("REAL", dt.float32),
Expand Down
4 changes: 2 additions & 2 deletions ibis/backends/sql/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
typecode.LONGTEXT: dt.String,
typecode.MEDIUMBLOB: dt.Binary,
typecode.MEDIUMTEXT: dt.String,
typecode.MONEY: dt.Int64,
typecode.MONEY: dt.Decimal(19, 4),
typecode.NCHAR: dt.String,
typecode.UUID: dt.UUID,
typecode.NULL: dt.Null,
typecode.NVARCHAR: dt.String,
typecode.OBJECT: partial(dt.Map, dt.string, dt.json),
typecode.SMALLINT: dt.Int16,
typecode.SMALLMONEY: dt.Int32,
typecode.SMALLMONEY: dt.Decimal(10, 4),
typecode.TEXT: dt.String,
typecode.TIME: dt.Time,
typecode.TIMETZ: dt.Time,
Expand Down

0 comments on commit ecc5d70

Please sign in to comment.