-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Incorrect filtering for numeric values with different decimal precision #33206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect filtering for numeric values with different decimal precision #33206
Comments
The issue you're experiencing with numeric filtering in Superset, where selecting an integer value first results in an overly strict match that excludes decimal representations, might be related to how Superset handles numeric values and filters. Superset has a Furthermore, the Given the behavior you've described, it might be worth investigating whether the numeric filtering logic in Superset is correctly handling decimal precision across different database backends. You may want to explore the code related to numeric filtering and see if adjustments are needed to ensure consistent behavior regardless of the initial value selected. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Feels like a good first issue to me |
Can I work on this issue? I am working superset and would like to contribute to the product |
@suraj-mandal go for it! I'll happily assign it to you if you want to call dibs on it :D Thank you for contributing! |
Thanks, getting right into it! |
Hi @suraj-mandal, Can you please include me as well? I would love to collaborate with you on this issue. |
Sure |
@dosu, can you tell me how to reproduce this issue? |
To reproduce the issue with numeric filtering in Superset, follow these steps:
This issue has been observed across multiple databases, including ClickHouse, Impala, and PostgreSQL. The expected behavior is that filtering by numeric value should match all equivalent numeric representations, regardless of the number of decimal places. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
@dosu can you tell me the dataset that has been used here? |
@Sayan199 , I tested your file in my local development server, and there are some formatting issues. Moreover, I tested it on my server, but I can see that sometimes inconsistencies are coming. Do check once! |
Bug description
Summary
There is an issue with filtering numeric values in Superset when values have different numbers of digits after the decimal point.
Steps to Reproduce
Expected Behavior
Filtering by numeric value should match all equivalent numeric representations (e.g., 21, 21.8, 25.35) regardless of how many decimal places are used.
Actual Behavior
Filtering is inconsistent depending on whether an integer or decimal value is selected first. Selecting an integer leads to an overly strict match that excludes decimal representations of the same value.
Databases Affected
This issue has been observed across all three databases tested:
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
I don't know
Browser
Not applicable
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: