dpgaspar commented on a change in pull request #14638:
URL: https://github.com/apache/superset/pull/14638#discussion_r632396874



##########
File path: superset/connectors/sqla/models.py
##########
@@ -231,14 +222,20 @@ def is_temporal(self) -> bool:
         """
         if self.is_dttm is not None:
             return self.is_dttm
-        column_spec = 
self.table.database.db_engine_spec.get_column_spec(self.type)
-        if column_spec is None:
-            return False
-        return column_spec.is_dttm
+        return self.type_generic == GenericDataType.TEMPORAL
+
+    @property
+    def db_engine_spec(self) -> Type[BaseEngineSpec]:
+        return self.table.db_engine_spec
+
+    @property
+    def type_generic(self) -> Optional[utils.GenericDataType]:

Review comment:
       consider renaming to `get_generic_type` gives an head warning that it 
will do some computation around it




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

Reply via email to