codewithdaniel1 commented on code in PR #42625:
URL: https://github.com/apache/superset/pull/42625#discussion_r3717066101
##########
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:
Updated this to handle leading None and Boolean values by moving the first
decimal to the front whenever a mixed integer/decimal numeric list does not
already start with a decimal. I also added regression coverage for leading
nulls, leading booleans, zero, and negative values. Thanks for pointing out the
edge case.
--
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]