dosubot[bot] commented on issue #33206: URL: https://github.com/apache/superset/issues/33206#issuecomment-2821251855
<!-- Answer --> 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 `NumericalRangeFilter` component that manages numeric range inputs and ensures that the minimum value is strictly less than the maximum value <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/components/ListView/Filters/NumericalRange.tsx)</sup>. Additionally, the `getRangeExtraFormData` function constructs filter clauses for numeric ranges, adding conditions for lower and upper bounds <sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/src/filters/utils.ts)</sup>. However, there might be a need to review how these components interact with different database backends like ClickHouse, Impala, and PostgreSQL, especially regarding decimal precision. Furthermore, the `handle_single_value` function in `superset/models/helpers.py` checks if the value is a float or int and casts the string representation of a numeric value to a number for backward compatibility <sup>[[3]](https://github.com/apache/superset/blob/master/superset/models/helpers.py)</sup>. This might be relevant to your issue, as it suggests that numeric values are explicitly handled or transformed when applying filters. 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. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/adc3837e-8f74-4945-b521-c5098c771d6b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/adc3837e-8f74-4945-b521-c5098c771d6b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/adc3837e-8f74-4945-b521-c5098c771d6b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/adc3837e-8f74-4945-b521-c5098c771d6b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/adc3837e-8f74-4945-b521-c5098c771d6b?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/adc3837e-8f74-4945-b521-c5098c771d6b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/adc3837e-8f74-4945-b521-c5098c771d6b?feedback_type=other)</sup> -- 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]
