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/09/28 14:13:12 UTC

[GitHub] [superset] frafra removed a comment on issue #15905: Global async query - Unserializable object {} of type

frafra removed a comment on issue #15905:
URL: https://github.com/apache/superset/issues/15905#issuecomment-929261346


   The function `json_iso_dttm_ser` is almost identical, but it tries to convert to ISO format instead of an integer, and it has support for `time`:
   https://github.com/apache/superset/blob/27a40d2a675fc2f9031eb1c072da046248c069ea/superset/utils/core.py#L587-L588
   
   In case of `time`, `.isoformat()` is equivalent to `str(...)`: `    __str__ = isoformat` (https://github.com/python/cpython/blob/84975146a7ce64f1d50dcec8311b7f7188a5c962/Lib/datetime.py#L1434)
   
   As a time without a date cannot be converted to an integer with respect to EPOCH, we should decide if it would make more sense to convert it to seconds (from the beginning of the midnight) or to a string.
   
   `datetime.time` has no `total_seconds()` method or similar, so I would suggest converting it to a string, which seems the safest solution.


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