sadpandajoe commented on code in PR #42054:
URL: https://github.com/apache/superset/pull/42054#discussion_r3591574078
##########
superset/utils/date_parser.py:
##########
@@ -120,7 +128,11 @@
source_dttm = dttm_from_timetuple(
source_time.timetuple() if source_time else datetime.now().timetuple()
)
- return dttm_from_timetuple(cal.parse(human_readable or "", source_dttm)[0])
+ human_readable = _QUARTERS_PATTERN.sub(
+ lambda match: f"{int(match[1]) * 3} months",
+ human_readable or "",
Review Comment:
Fixed in feaf01e6e8: added a negative lookbehind and bounded the digit
repetition (`(?<![0-9])([0-9]{1,10})`) so matching stays linear on long digit
runs; oversized counts now fall through to parsedatetime as unparseable, with a
regression test for a 100k-digit input.
_🤖 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]