aminghadersohi commented on code in PR #42625:
URL: https://github.com/apache/superset/pull/42625#discussion_r3716697218
##########
superset/models/helpers.py:
##########
@@ -4120,6 +4120,29 @@ def get_sqla_query( # pylint:
disable=too-many-arguments,too-many-locals,too-ma
)
elif is_list_target:
assert isinstance(eq, (tuple, list))
+ if (
+ target_generic_type == utils.GenericDataType.NUMERIC
+ and len(eq) > 1
+ and isinstance(eq[0], int)
+ and not isinstance(eq[0], bool)
+ and any(isinstance(item, float) for item in eq[1:])
Review Comment:
Minor, optional: the reorder is gated on `eq[0]`, so a list whose first
element is `None` (or a leading `bool`) skips it entirely — e.g. `[None, 1,
2.5]`. After the later `None`-split below, `.in_([1, 2.5])` is again int-first
and the decimal can still coerce to int. Keying off the first non-`None`
element instead would close that residual. Low severity (unusual filter shape),
not blocking.
--
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]