Skip to content

feat(sidebar): filter tables and columns by comment as well as name - #4836

Merged
datlechin merged 2 commits into
mainfrom
feat/filter-by-comment
Dec 2, 2026
Merged

datlechin merged 2 commits into
mainfrom
feat/filter-by-comment

Conversation

@datlechin

@datlechin datlechin commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The sidebar filter matches a table's or view's comment when the name misses. Comment matches rank after every name match. Covers the List and Tree layouts, the other-schema listing, Temporary tables and Favorites. Recent stays name-only, since its rows show no comment.
  • The Structure filter matches a column's comment. It now ignores case, accents and surrounding spaces, the same way the sidebar does.
  • The Triggers, Favorites and Redis key filters use the same matcher.
  • Fixed: the sidebar said No Results while Redis keys or Recent tables matched.
  • Fixed: a sidebar filter of only spaces ran a search.
  • Fixed: pasted Structure rows that the filter hid stayed hidden. They are now revealed and selected.
  • Table listings now read the comment in the same catalog query on Oracle, Dameng, SQL Server, ClickHouse, Cassandra, DuckDB, CockroachDB, Redshift, Snowflake and Teradata. ClickHouse reads it only when the server has system.tables.comment. BigQuery is unchanged: tables.list returns no description.
  • CockroachDB Table Info no longer shows a built-in function's description for a table without a comment.
  • Faster matching for an ASCII or Han query: a byte and scalar path gives the same result as localizedStandardRange, which stays the fallback.
  • Tests updated on purpose:
    • MSSQLSchemaQueriesTests, CockroachRelationSQLTests, RedshiftTableCatalogTests and PostgreSQLCatalogSQLPinTests pinned the old listing columns.
    • ClickHouseTableListTests follows the new tableListSQL(schema:readsComments:).

Before
After
Before, dark
After, dark

Needs the maintainer

  • Publish the registry plugins after merge: Oracle, SQL Server, DuckDB, Snowflake, Cassandra, Dameng and Teradata.

Test plan

  • New tests in SidebarSearchTests, SidebarNameFilterTests, DatabaseTreeFilterQualifiedSearchTests, DatabaseTreeRecentFilterTests, SidebarViewModelMultiSectionTests, FavoriteTableResolverTests, FavoritesSidebarViewModelTests, RedisKeyTreeDisplayTests, StructureRowProviderTests, StructureDefinitionPasteTests, ClickHouseTableListTests, the Cockroach and Redshift catalog tests, MSSQLSchemaQueriesTests, TeradataSchemaQueriesTests and OracleSchemaQueriesTests.
  • cjkTextMatchesLocaleAwareSearch compares the fast path with localizedStandardRange. It includes U+3000 and U+301D to U+301F beside digits, which the first version got wrong.
  • verify.sh:
    • 80 Unit suites: 804 tests pass.
    • TableProCore (MSSQL, Teradata) and TableProOracle package tests pass.
    • AllPlugins builds. l10n and lint pass.
  • Listings run against real servers, before and after:
    • Oracle 23ai, Dameng DM8, SQL Server 2022 (including a login with limited rights).
    • ClickHouse 25.8 and 19.16, Cassandra 5.0, DuckDB 2.0.
    • CockroachDB 26.4 and 22.2, and PostgreSQL 17 for the Redshift SQL.
    • Same rows and order everywhere; comments come through, including CJK text.

Fixes #4831

@datlechin
datlechin merged commit 352d6f0 into main Dec 2, 2026
9 of 11 checks passed
@datlechin
datlechin deleted the feat/filter-by-comment branch December 2, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support filtering tables and columns by both name and comment

1 participant