Skip to content

Commit

Permalink
fix(mysql): add dtype mapping for mediumint
Browse files Browse the repository at this point in the history
  • Loading branch information
gforsyth authored and cpcloud committed Sep 13, 2024
1 parent a1bd3ba commit 6d22c5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ibis/backends/mysql/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
param("boolean", dt.int8, id="boolean"),
param("smallint", dt.int16, id="smallint"),
param("int2", dt.int16, id="int2"),
# ("mediumint", dt.int32), => https://github.com/tobymao/sqlglot/issues/2109
# ("int3", dt.int32), => https://github.com/tobymao/sqlglot/issues/2109
param("mediumint", dt.int32, id="mediumint"),
param("int3", dt.int32, id="int3"),
param("int", dt.int32, id="int"),
param("int4", dt.int32, id="int4"),
param("integer", dt.int32, id="integer"),
Expand Down
1 change: 1 addition & 0 deletions ibis/backends/sql/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
typecode.LONGBLOB: dt.Binary,
typecode.LONGTEXT: dt.String,
typecode.MEDIUMBLOB: dt.Binary,
typecode.MEDIUMINT: dt.Int32,
typecode.MEDIUMTEXT: dt.String,
typecode.MONEY: dt.Decimal(19, 4),
typecode.NCHAR: dt.String,
Expand Down

0 comments on commit 6d22c5c

Please sign in to comment.