varadendrasimha511 commented on code in PR #42752:
URL: https://github.com/apache/superset/pull/42752#discussion_r3726894915
##########
superset/models/helpers.py:
##########
@@ -4162,6 +4162,17 @@ def get_sqla_query( # pylint:
disable=too-many-arguments,too-many-locals,too-ma
else:
cond = is_null_cond
else:
+ # Normalize mixed int/float values before binding,
since
+ # SQLAlchemy may infer the bind parameter type from the
+ # first element and silently truncate other values
+ # (see #33206)
+ if target_generic_type ==
utils.GenericDataType.NUMERIC and any(
Review Comment:
Good catch — moved the normalization above the `eq_without_none` derivation
so it now covers both the NULL and non-NULL branches. Added a test case
(`test_get_sqla_query_in_filter_preserves_float_precision_with_null`) covering
the `[33, 29.02, NULL]` scenario specifically.
--
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]