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 2022/06/21 15:56:12 UTC

[GitHub] [superset] john-bodley commented on a diff in pull request #20456: fix: handle tstzrange PostgreSQL column type

john-bodley commented on code in PR #20456:
URL: https://github.com/apache/superset/pull/20456#discussion_r902796677


##########
superset/utils/core.py:
##########
@@ -580,6 +581,10 @@ def json_iso_dttm_ser(obj: Any, pessimistic: bool = False) -> str:
         return val
     if isinstance(obj, (datetime, date, pd.Timestamp)):
         obj = obj.isoformat()
+    elif isinstance(obj, psycopg2._range.DateTimeTZRange):

Review Comment:
   Thanks for the fix, however database specific encoding should be handled by the associated DB engine spec. I _think_ the solution would be to move `json_iso_dttm_ser` to `db_engine_specs/base.py` and override it for PostgreSQL.



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