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 2020/04/02 18:05:38 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #9444: Implement dttm column configuration through db extra config

etr2460 commented on a change in pull request #9444: Implement dttm column configuration through db extra config
URL: https://github.com/apache/incubator-superset/pull/9444#discussion_r402511181
 
 

 ##########
 File path: superset/connectors/sqla/models.py
 ##########
 @@ -145,6 +146,17 @@ class TableColumn(Model, BaseColumn):
     update_from_object_fields = [s for s in export_fields if s not in ("table_id",)]
     export_parent = "table"
 
+    def get_expression(self):
+        if config["SIP_15_ENABLED"] and not self.expression:
+            db_default_expression = (
+                self.table.database.get_extra()
+                .get("expression_by_column_name", {})
+                .get(self.column_name)
+            )
+            # TODO(bkyryliuk): consider setting self.expression to db_default_expreassion
 
 Review comment:
   nit: typo `db_default_expreassion`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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