john-bodley commented on pull request #16318:
URL: https://github.com/apache/superset/pull/16318#issuecomment-951546792


   Also @villebro this breaks the logic in 
[`normalize_dttm_col`](https://github.com/apache/superset/blob/4f1d202430c35723130d2004b2e7b8a345bb8ab7/superset/utils/core.py#L1709-L1735)
 given that resulting transformed data will be formatted as a `TIMESTAMP` (or 
similar) per the time grain transformations and thus no longer adhere to the 
Python date format say, hence we see errors of the form:
   
   ```
   Traceback (most recent call last):
     File 
"/usr/local/lib/python3.8/dist-packages/pandas/core/tools/datetimes.py", line 
456, in _convert_listlike_datetimes
       values, tz = conversion.datetime_to_datetime64(arg)
     File "pandas/_libs/tslibs/conversion.pyx", line 350, in 
pandas._libs.tslibs.conversion.datetime_to_datetime64
   TypeError: Unrecognized value type: <class 'str'>
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/srv/superset-internal/superset-fork/superset/viz.py", line 543, in 
get_df_payload
       df = self.get_df(query_obj)
     File "/srv/superset-internal/superset-fork/superset/viz.py", line 284, in 
get_df
       utils.normalize_dttm_col(
     File "/srv/superset-internal/superset-fork/superset/utils/core.py", line 
1728, in normalize_dttm_col
       df[DTTM_ALIAS] = pd.to_datetime(
     File 
"/usr/local/lib/python3.8/dist-packages/pandas/core/tools/datetimes.py", line 
805, in to_datetime
       values = convert_listlike(arg._values, format)
     File 
"/usr/local/lib/python3.8/dist-packages/pandas/core/tools/datetimes.py", line 
460, in _convert_listlike_datetimes
       raise e
     File 
"/usr/local/lib/python3.8/dist-packages/pandas/core/tools/datetimes.py", line 
423, in _convert_listlike_datetimes
       result, timezones = array_strptime(
     File "pandas/_libs/tslibs/strptime.pyx", line 150, in 
pandas._libs.tslibs.strptime.array_strptime
   ValueError: unconverted data remains: -01-01T00:00:00.000Z
   ```


-- 
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: [email protected]

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