rusackas opened a new pull request, #41867:
URL: https://github.com/apache/superset/pull/41867

   ### SUMMARY
   
   ClickHouse rejects the `column IS true/false` syntax that Superset generates 
for boolean filters, producing queries like `WHERE is_cancelled IS false` that 
fail to execute against ClickHouse.
   
   This reuses the engine-spec toggle introduced for Snowflake in #34199 (also 
used by Athena and Presto): setting `use_equality_for_boolean_filters = True` 
on `ClickHouseBaseEngineSpec` makes boolean filters render as `= true`/`= 
false` instead of `IS true`/`IS false`.
   
   The Snowflake half of #33235 was fixed by #34199; this PR covers the 
remaining ClickHouse case reported on the same issue.
   
   ### BEFORE/AFTER
   
   Before (invalid on ClickHouse):
   ```sql
   SELECT * FROM table WHERE is_cancelled IS false
   ```
   
   After:
   ```sql
   SELECT * FROM table WHERE is_cancelled = false
   ```
   
   Other engines continue to use `IS true/false` as before.
   
   ### TESTING INSTRUCTIONS
   
   - `pytest tests/unit_tests/db_engine_specs/test_clickhouse.py -k boolean`
   - Added `test_handle_boolean_filter` and 
`test_use_equality_for_boolean_filters_property` mirroring the existing 
Snowflake tests, asserting the generated predicate is `test_col = true` / 
`test_col = false`.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue: Fixes #33235
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to