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 2018/08/14 18:15:44 UTC

[GitHub] mistercrunch commented on a change in pull request #5629: [bugfix] TIMESTAMP not detected as date

mistercrunch commented on a change in pull request #5629: [bugfix] TIMESTAMP not detected as date
URL: https://github.com/apache/incubator-superset/pull/5629#discussion_r210052882
 
 

 ##########
 File path: superset/dataframe.py
 ##########
 @@ -134,8 +134,12 @@ def datetime_conversion_rate(cls, data_series):
 
     @classmethod
     def is_date(cls, dtype):
-        if dtype.name:
-            return dtype.name.startswith('datetime')
+        if dtype and dtype.name:
+            return any([
+                dtype.name.startswith(s.lower())
+                for s in ['date', 'time']
 
 Review comment:
   oops, realized I was lowering the hard coded strings...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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