Skip to content

Commit

Permalink
fix: only replaces datatypes and not column names (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
nehanene15 committed Apr 20, 2022
1 parent cd88b25 commit 6143794
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions third_party/ibis/ibis_impala/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ def parse_type(t):
return ValueError(t)
elif "struct" in t or "array" in t or "map" in t:
if "bigint" in t:
t = t.replace("bigint", "int64")
t = t.replace(":bigint", ":int64")
elif "tinyint" in t:
t = t.replace("tinyint", "int8")
t = t.replace(":tinyint", ":int8")
elif "smallint" in t:
t = t.replace("smallint", "int16")
t = t.replace(":smallint", ":int16")
else:
t = t.replace("int", "int32")
t = t.replace(":int", ":int32")

if "varchar" in t:
t = t.replace("varchar", "string")
t = t.replace(":varchar", ":string")
else:
t = t.replace("char","string")
t = t.replace(":char",":string")
return t
else:
raise Exception(t)
Expand Down

0 comments on commit 6143794

Please sign in to comment.