sadpandajoe commented on code in PR #45822:
URL: https://github.com/apache/superset/pull/45822#discussion_r4418459156
##########
superset/models/helpers.py:
##########
@@ -6980,11 +7013,27 @@ def get_sqla_query( # pylint:
disable=too-many-arguments,too-many-locals,too-ma
and isinstance(eq, str)
and col_obj is not None
):
- _since, _until = get_since_until_from_time_range(
- time_range=eq,
- time_shift=time_shift,
- extras=extras,
- )
+ try:
+ _since, _until = get_since_until_from_time_range(
+ time_range=eq,
+ time_shift=time_shift,
+ extras=extras,
+ )
+ except (
+ TimeRangeParseFailError,
+ TimeRangeAmbiguousError,
+ ValidationError,
+ ValueError,
Review Comment:
A secondary temporal filter like `"2024-01-01T00:00:00Z : 2024-01-02"` still
returns a 500: `get_since_until` compares an offset-aware `_since` with a naive
`_until` (`_since > _until`) and raises `TypeError`, which isn't in this tuple,
so it escapes the new handler. The same gap applies to the other guards added
here. Should `TypeError` be caught too, or is mixed-timezone input
intentionally out of scope for this fix?
--
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]