aminghadersohi commented on code in PR #45671:
URL: https://github.com/apache/superset/pull/45671#discussion_r4362733935


##########
superset/utils/date_parser.py:
##########
@@ -846,8 +845,13 @@ def eval(self) -> datetime:
                 month=1, day=1, hour=0, minute=0, second=0, microsecond=0
             )
         if unit == "quarter":
-            dttm = (
-                pd.Period(pd.Timestamp(dttm), 
freq="Q").to_timestamp().to_pydatetime()
+            dttm = dttm.replace(

Review Comment:
   A saved range such as `DATETRUNC(DATETIME('2024-05-31T12:00:00+08:00'), 
QUARTER) : now` succeeds before this change but raises `TypeError` on the 
aware/naive comparison afterward, returning HTTP 500 from the time-range API. 
Please handle mixed bounds explicitly.



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