zhaoyongjie commented on a change in pull request #14863:
URL: https://github.com/apache/superset/pull/14863#discussion_r643817399
##########
File path: superset/connectors/sqla/models.py
##########
@@ -677,13 +677,25 @@ def external_metadata(self) -> List[Dict[str, str]]:
for col in cols:
try:
if isinstance(col["type"], TypeEngine):
- col["type"] = db_engine_spec.column_datatype_to_string(
+ db_type = db_engine_spec.column_datatype_to_string(
col["type"], db_dialect
)
+ type_spec = db_engine_spec.get_column_spec(db_type)
+ col.update(
+ {
+ "type": db_type,
+ "generic_type": type_spec.generic_type
Review comment:
good catch, rename it. btw, the method `external_metadata(self)` is for
getting metadata from the table in database(In other words, not in superset
saved metadata).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]