You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/14 01:27:47 UTC

[GitHub] [superset] ktmud commented on a diff in pull request #19701: fix: convert column type to str during dual read/write

ktmud commented on code in PR #19701:
URL: https://github.com/apache/superset/pull/19701#discussion_r850012462


##########
superset/connectors/sqla/utils.py:
##########
@@ -180,6 +180,15 @@ def is_column_type_temporal(column_type: TypeEngine) -> bool:
         return False
 
 
+def convert_column_type(column_type: TypeEngine) -> str:
+    if column_type.python_type == list:
+        return "ARRAY"
+    if column_type.python_type == dict:
+        return "JSON"

Review Comment:
   Can it also be a `STRUCT`? I guess it probably depends on the database.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org