Skip to content

Commit 543b34c

Browse files
authored
Merge pull request #42 from sede-open/hotfix/array-string-type
Hotfix/array string type
2 parents 69b23e8 + ba23683 commit 543b34c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/databricks/sqlalchemy/dialect/compiler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ def visit_JSON(self, type_):
4646
return "STRUCT"
4747

4848
def visit_ARRAY(self, type_):
49-
if type_.item_type == 'VARCHAR':
49+
element_type = type_.item_type
50+
element_type = str(element_type)
51+
if element_type == 'VARCHAR':
5052
return "ARRAY<STRING>"
5153
else:
5254
return "ARRAY<{type}>".format(type=type_.item_type)

0 commit comments

Comments
 (0)