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 2021/08/09 08:11:49 UTC

[GitHub] [superset] villebro commented on a change in pull request #16139: feat(cross-filters): add support for temporal filters

villebro commented on a change in pull request #16139:
URL: https://github.com/apache/superset/pull/16139#discussion_r684992730



##########
File path: superset/connectors/sqla/models.py
##########
@@ -303,13 +307,15 @@ def get_timestamp_expression(
 
         pdf = self.python_date_format
         is_epoch = pdf in ("epoch_s", "epoch_ms")
+        column_spec = self.db_engine_spec.get_column_spec(self.type)
+        type_ = column_spec.sqla_type if column_spec else DateTime
         if not self.expression and not time_grain and not is_epoch:
-            sqla_col = column(self.column_name, type_=DateTime)
+            sqla_col = column(self.column_name, type_=type_)

Review comment:
       This was incorrectly hardcoded to `DateTime` (the correct type is received from the column spec)




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