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