rusackas commented on PR #36777: URL: https://github.com/apache/superset/pull/36777#issuecomment-4816403558
Picked this up to get it across the line, @Praveshvermaa, thanks for the original fix! Rebased on current master, marked it ready, and worked through the bot threads: - Moved the `or_`/`false` imports up to module level (out of the function body). - Deduplicated the coerced boolean values so we don't emit redundant OR terms for inputs like `[0, False, "false"]`. - Used a `callable(getattr(...))` guard for the `handle_boolean_in_clause` hook, and dropped the redundant `list(eq)`. Also collapsed the duplicated null-handling branch in `helpers.py` down to one path. - Reworked the test to build the column from a real `MetaData()` instead of a `MagicMock`, and to assert on the compiled SQL (boolean literal rendering, dedup down to two terms, and a constant `FALSE` for all-None/unrecognized input). One thing I left as-is and worth a sanity check: unrecognized strings (e.g. "yes"/"maybe") are silently skipped rather than raising, which matches how the rest of the filter path treats junk values. All Python pre-commit hooks pass locally. Running CI 🤞 -- 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]
