mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 08:50:18 +00:00
parent
87de0df9d8
commit
c37944a088
@ -94,6 +94,12 @@ class SqlColumnHandlerMixin:
|
||||
parsed_string["name"] = column["name"]
|
||||
else:
|
||||
col_type = ColumnTypeParser.get_column_type(column["type"])
|
||||
# For arrays, we'll get the item type if possible, or parse the string representation of the column
|
||||
# if SQLAlchemy does not provide any further information
|
||||
if col_type == "ARRAY" and getattr(column["type"], "item_type"):
|
||||
arr_data_type = ColumnTypeParser.get_column_type(
|
||||
column["type"].item_type
|
||||
)
|
||||
if col_type == "ARRAY" and re.match(
|
||||
r"(?:\w*)(?:\()(\w*)(?:.*)", str(column["type"])
|
||||
):
|
||||
|
@ -76,7 +76,9 @@ class CommonMapTypes:
|
||||
"""returns an ORM type"""
|
||||
|
||||
if col.arrayDataType:
|
||||
return self._TYPE_MAP.get(col.dataType)(item_type=col.arrayDataType)
|
||||
return self._TYPE_MAP.get(col.dataType)(
|
||||
item_type=self._TYPE_MAP.get(col.arrayDataType)
|
||||
)
|
||||
return self.return_custom_type(col, table_service_type)
|
||||
|
||||
def return_custom_type(self, col: Column, _):
|
||||
|
Loading…
x
Reference in New Issue
Block a user