mistercrunch commented on a change in pull request #6719: Adding support for 
Pinot
URL: 
https://github.com/apache/incubator-superset/pull/6719#discussion_r278393827
 
 

 ##########
 File path: superset/viz.py
 ##########
 @@ -226,7 +228,22 @@ def get_df(self, query_obj=None):
             if DTTM_ALIAS in df.columns:
                 if timestamp_format in ('epoch_s', 'epoch_ms'):
                     # Column has already been formatted as a timestamp.
-                    df[DTTM_ALIAS] = df[DTTM_ALIAS].apply(pd.Timestamp)
+                    dttm_col = df[DTTM_ALIAS]
+                    one_ts_val = dttm_col[0]
+
+                    # convert time column to pandas Timestamp, but different
+                    # ways to convert depending on string or int types
+                    try:
+                        int(one_ts_val)
+                        is_integral = True
+                    except ValueError:
 
 Review comment:
   FYI there's a bug around this, fixed it here 
https://github.com/apache/incubator-superset/pull/7375

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