Repository navigation
feat(datagrid): add case sensitivity to data grid filters - #2052
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
datlechin
added a commit
that referenced
this pull request
Aug 9, 2026
* feat(datagrid): add case sensitivity to data grid filters * fix(plugins): keep case sensitivity separate from what a backend supports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2048.
The problem
Case sensitivity had no representation anywhere: not in
TableFilter, not inFilterSQLGenerator, and not in the(column, op, value)tuple that crosses into plugins. Case-sensitivecontainson DuckDB is one visible instance of that missing dimension.The gap was masked in opposite directions, which is why it read as a bug rather than a missing feature. MySQL, SQLite and SQL Server looked correct because their default collation already folds case. MongoDB, Elasticsearch, DynamoDB and etcd looked correct because they hardcoded
i-mode with no way to turn it off. PostgreSQL, DuckDB, Oracle and BigQuery were simply where the absence showed.What changed
TableFiltergainsisCaseSensitive, modelled onNSComparisonPredicate.Options.caseInsensitiveand the[c]predicate-format modifier rather than doubling the operator enum. The operator dropdown stays at 18 entries.Contains, not contains, starts with and ends with ignore case. Equals, not equals, IN, NOT IN and regex match case. Both are per row, and the setting lives in the operator menu under a divider, so picking an operator is still two clicks and the row gains no width. A row that departs from its operator's usual setting shows an
Aaicon on the button, so the common case looks exactly as it does today.SQLDialectDescriptorgains acaseSensitivityStylethat decides what each engine emits:ilikeOperatorILIKEfor the LIKE family,LOWER()for equals/INcaseFoldFunctionlowerUTF8), RedshiftLOWER(col) LIKE LOWER(pat)regexFlagregexp_like(col, pat, 'i'), anchored per operatordriverManagedcollationDefinedunsupportedTwo calls worth flagging:
caseFoldFunction, notilikeOperator, even though both haveILIKE. AWS documents Redshift'sILIKEas folding single-byte ASCII only and tells you to useLOWERfor multibyte; ClickHouse folds by English rules on single-byte assumptions. Using their native operator would be silently wrong on non-ASCII data.collationDefined, not "always case-insensitive". TablePro cannot observe a column's collation, so claiming SQL Server always ignores case would be false on a_CS_ASdatabase or a MySQL_bincolumn. The disabled control's tooltip says case sensitivity follows the column's collation, which is true.ABI
SQLDialectDescriptor's single public init is called by every shipped registry plugin binary, so it gained a new overload with@_disfavoredOverloadon the existing one, per the 0.49.0columnMeta:lesson. Same technique for a newbuildFilteredQuery/fetchFilteredRowCount/fetchExactRowCountoverload taking a newPluginQueryFilterstruct; the default implementations forward to the existing tuple versions, so an un-updated plugin returns exactly the SQL it returns today rather than dropping the filter.Verified by building TableProPluginKit at
mainand at this branch and diffing exported symbols: 0 removed, 79 added.scripts/check-pluginkit-abi.shreports the diff, and every line in it is an addition apart from the old initializer, which reappears with an identical signature (@_disfavoredOverloaddoes not change mangling). NocurrentPluginKitVersionbump and no plugin re-release needed.A stale registry plugin reports
unsupportedand keeps today's behaviour. To avoid making users wait for a plugin release,PluginMetadataRegistry.adoptCuratedCaseSensitivitylets the app's curated entry fill that gap for engines it already knows, the same shape as the existingwithSwitchRoutingfallback. So DuckDB users getILIKEon the next app build, without updating the DuckDB plugin.Behaviour change to be aware of
The new default applies to filters already saved to disk, so a saved
containsfilter now ignores case on PostgreSQL, DuckDB, ClickHouse, Snowflake, Redshift, CockroachDB, Oracle, BigQuery and Trino. That is the point of the change, and it is what makes those engines agree with MySQL, SQLite and MongoDB, but it is a change on upgrade rather than only a new feature. Match Case restores the old behaviour per row. MySQL, SQLite, SQL Server and the document stores see no change at all.One adjacent fix included
BigQuery's dialect declared
likeEscapeStyle: .explicit, so the exact-row-count path emittedLIKE '%x%' ESCAPE '!'. BigQuery has noESCAPEclause, so that count query was a syntax error. It is a one-line correction inside the function this change rewrites, and shipping the new feature on top of it would have shipped it broken. Left out as separate issues: SQL Server not escaping[/[^in LIKE patterns, and MySQL underNO_BACKSLASH_ESCAPES. Neither is touched by this change.Tests
291 passing across the affected suites, including:
FilterSQLGeneratorcovering ILIKE, fold, regex-flag, collation-defined and unsupported enginesSQLDialectDescriptorinitializer still yieldsunsupported, which is what keeps stale plugins safeTableProQueryTestsNo
TableProUITestscoverage: the filter panel needs a live connection and an open table tab, which the existing UI tests do not set up and which would not run deterministically in CI. The presentation rules were extracted intoFilterCaseSensitivityPresentation, a pure type, and unit-tested instead.Verified
swiftlint lint --strictclean across 1285 files