DataLakeCatalog: avoid full catalog read for UNKNOWN_TABLE typo hints#100452
Open
alsugiliazova wants to merge 1 commit intoClickHouse:masterfrom
Open
DataLakeCatalog: avoid full catalog read for UNKNOWN_TABLE typo hints#100452alsugiliazova wants to merge 1 commit intoClickHouse:masterfrom
UNKNOWN_TABLE typo hints#100452alsugiliazova wants to merge 1 commit intoClickHouse:masterfrom
Conversation
UNKNOWN_TABLE typo hintsUNKNOWN_TABLE typo hints
Contributor
Author
|
@divanik can you please put can-be-tested label? |
alesapin
approved these changes
Mar 24, 2026
Contributor
|
Workflow [PR], commit [b1102b9] Summary: ❌
AI ReviewSummaryThis PR avoids expensive remote catalog enumeration for typo hints on missing tables in ClickHouse Rules
Final Verdict
|
52b7eb3 to
b1102b9
Compare
Contributor
LLVM Coverage Report
PR changed lines: PR changed-lines coverage: 85.71% (6/7, 0 noise lines excluded) |
Contributor
Author
|
Failures (2) are not related to PR:
|
27 tasks
zvonand
added a commit
to Altinity/ClickHouse
that referenced
this pull request
Mar 28, 2026
Antalya 26.1 Backport of ClickHouse#100452 - DataLakeCatalog: avoid full catalog read for UNKNOWN_TABLE typo hints
Contributor
Author
|
@alesapin CI looks good, can you please merge? |
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Avoid scanning the whole remote data lake catalog for “Maybe you meant …” table hints when
show_data_lake_catalogs_in_system_tablesis disabled.Documentation entry for user-facing changes
When
show_data_lake_catalogs_in_system_tables = 0, the server must not implicitly scan the whole remote data lake catalog.Previously, building the “Maybe you meant …” hint for a missing table in a
DataLakeCatalogdatabase still calledgetAllTableNames()→DatabaseDataLake::getTablesIterator(), which lists the entire catalog and loads per-table metadata—heavy work and can OOM on large catalogs, only to enrich an error message.This change makes
TableNameHints::getAllRegisteredNames()return an empty name list for data lake catalogs when that setting is off, so hint generation does not trigger a full catalog listing.Query examples
Drop non-existent table:
Previously (undesired): server could answer with
UNKNOWN_TABLEand a “Maybe you meant …” suggestion after scanning catalog names:After the fix:
UNKNOWN_TABLEwithout hint when the setting is0:Optional follow-up
If local hints are skipped for data lake + setting
0,getHintForTablecan still fall back togetExtendedHintForTable, which only scans non–data-lake databases. In edge cases a suggestion could point at another database’s table. If that is undesirable, a follow-up could skip extended hints under the same condition as local enumeration.