bito-code-review[bot] commented on PR #42625:
URL: https://github.com/apache/superset/pull/42625#issuecomment-5185444745
<!-- Bito Reply -->
The suggestion to key off the first non-`None` element instead of `eq[0]` is
a valid improvement to make the filter logic more robust against lists
containing `None` or boolean values. This would prevent the reordering logic
from being skipped prematurely in cases like `[None, 1, 2.5]` and ensure that
the decimal-first reordering is applied consistently when mixed numeric types
are present.
**superset/models/helpers.py**
```
first_non_none_index = next(
index
for index, item in enumerate(eq)
if item is not None
)
if isinstance(eq[first_non_none_index], int) and not
isinstance(eq[first_non_none_index], bool):
# ... existing logic to find and move decimal ...
```
--
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]