rusackas opened a new pull request, #41804: URL: https://github.com/apache/superset/pull/41804
### SUMMARY Table charts with server pagination let you search by any string-typed column, but native UUID columns (Postgres, ClickHouse) blow up when you do — they map to `GenericDataType.STRING`, so the LIKE/ILIKE handler in `models/helpers.py` skips the cast-to-string it applies to non-string columns, and the raw `ILIKE` hits the UUID column type. ClickHouse rejects it with `Illegal type UUID of argument of function ilike`, Postgres similarly. This adds a `is_uuid_native_type()` check so the LIKE-family handlers force the string cast when the native column type is a UUID (including wrapped forms like `Nullable(UUID)`). Searching UUID columns works instead of erroring, which seems friendlier than hiding them from the search dropdown. Same family of fix as #41653, just on the analytics-query side. Test-first: the new parametrized unit tests in `tests/unit_tests/models/helpers_test.py` fail on master and pass with the fix, plus a negative test asserting plain string columns don't pick up a redundant cast. Fixes #41795 ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A (query generation fix; before = query error toast shown in the issue, after = search returns rows) ### TESTING INSTRUCTIONS 1. Create a dataset with a native UUID column on Postgres or ClickHouse 2. Build a Table chart with server pagination enabled 3. Use the search box to search by the UUID column 4. Before: query fails with an illegal-type/ILIKE error; after: rows filter as expected Or just run `pytest tests/unit_tests/models/helpers_test.py -k uuid_column_casts` ### ADDITIONAL INFORMATION - [x] Has associated issue: #41795 - [ ] 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]
