Fix #3419: large complex datatype issue fixed (#3449)

* large complex datatype issue fixed

* removed unused variable
This commit is contained in:
Mayur Singal 2022-03-16 12:21:44 +05:30 committed by GitHub
parent 28a1918ed8
commit 6254fd8468
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,6 @@ def get_columns(self, connection, table_name, schema=None, **kw):
# Take out the more detailed type information
# e.g. 'map<ixnt,int>' -> 'map'
# 'decimal(10,1)' -> decimal
raw_data_type = col_type
col_type = re.search(r"^\w+", col_type).group(0)
try:
coltype = _type_map[col_type]
@ -90,9 +89,15 @@ def get_columns(self, connection, table_name, schema=None, **kw):
"type": coltype,
"nullable": True,
"default": None,
"comment": _comment,
}
if col_type in {"array", "struct", "map"}:
col_info["raw_data_type"] = raw_data_type
rows = dict(
connection.execute(
"DESCRIBE {} {}".format(table_name, col_name)
).fetchall()
)
col_info["raw_data_type"] = rows["data_type"]
result.append(col_info)
return result