sadpandajoe commented on code in PR #42054:
URL: https://github.com/apache/superset/pull/42054#discussion_r3591002873


##########
superset/utils/date_parser.py:
##########
@@ -98,6 +98,9 @@ def normalize_time_delta(human_readable: str) -> dict[str, 
int]:
     key = matched[2] + "s"
     value = int(matched[1])
     value = -value if matched[3] == "ago" else value
+    if key == "quarters":
+        # pd.DateOffset does not accept a `quarters` argument
+        key, value = "months", value * 3

Review Comment:
   Good catch — fixed in 6d5373d7d1: the unit key and the ago/later direction 
are both lowercased before comparison (the direction check had the same case 
bug, silently shifting forward for "1 year AGO"), with regression assertions 
added.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



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