villebro commented on a change in pull request #9316: fix: remove character set 
and collate column info by default
URL: 
https://github.com/apache/incubator-superset/pull/9316#discussion_r393921041
 
 

 ##########
 File path: superset/db_engine_specs/base.py
 ##########
 @@ -911,13 +912,18 @@ def column_datatype_to_string(
     ) -> str:
         """
         Convert sqlalchemy column type to string representation.
-        Can be overridden to remove unnecessary details, especially
-        collation info (see mysql, mssql).
+        By default removes collation and character encoding info to avoid 
unnecessarily
+        long datatypes.
 
         :param sqla_column_type: SqlAlchemy column type
         :param dialect: Sqlalchemy dialect
         :return: Compiled column type
         """
+        sqla_column_type = sqla_column_type.copy()
+        if hasattr(sqla_column_type, "collation"):
 
 Review comment:
   I agree, this seems obvious in retrospect 👍

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to