Skip to content

Antalya 26.3: DataLakeCatalog: avoid full catalog read for UNKNOWN_TABLE typo hints#1675

Merged
zvonand merged 2 commits into
antalya-26.3from
feature/antalya-26.3/ClickHouse-ClickHouse-pr-100452
Apr 24, 2026
Merged

Antalya 26.3: DataLakeCatalog: avoid full catalog read for UNKNOWN_TABLE typo hints#1675
zvonand merged 2 commits into
antalya-26.3from
feature/antalya-26.3/ClickHouse-ClickHouse-pr-100452

Conversation

@zvonand
Copy link
Copy Markdown
Collaborator

@zvonand zvonand commented Apr 22, 2026

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Avoid scanning the whole remote data lake catalog for “Maybe you meant …” table hints when show_data_lake_catalogs_in_system_tables is disabled (ClickHouse#100452 by @alsugiliazova).

Cherry-picked from ClickHouse#100452.


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 DataLakeCatalog database still called getAllTableNames()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

SET show_data_lake_catalogs_in_system_tables = 0;

Drop non-existent table:

DROP TABLE datalake.`schema1.table1`;

Previously (undesired): server could answer with UNKNOWN_TABLE and a “Maybe you meant …” suggestion after scanning catalog names:

Received exception from server (version 26.3.1):
Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Table datalake.`schema1.table1` does not exist. Maybe you meant datalake.`schema1.table`?. (UNKNOWN_TABLE)

After the fix: UNKNOWN_TABLE without hint when the setting is 0:

Received exception from server (version 26.4.1):
Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Table datalake.`schema1.table1` does not exist. (UNKNOWN_TABLE)

Optional follow-up

If local hints are skipped for data lake + setting 0, getHintForTable can still fall back to getExtendedHintForTable, 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.

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

…n_drop

DataLakeCatalog: avoid full catalog read for `UNKNOWN_TABLE` typo hints
@zvonand zvonand added the releasy Created/managed by RelEasy label Apr 22, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 22, 2026

Workflow [PR], commit [9d04f36]

@zvonand zvonand merged commit 9b3bb09 into antalya-26.3 Apr 24, 2026
277 of 305 checks passed
@alsugiliazova
Copy link
Copy Markdown
Member

Verification report: Altinity/ClickHouse PR #1675

Conclusion

PR is merged. CI red on head, but every failure is either a pre-existing flake or a regression-suite scenario already broken at baseline on antalya-26.3. No PR-caused regression found. The change is a 4-line guard against full catalog reads for typo hints — very small surface, very small blast radius.

Caveat — partial frontport (same as #1640 / #1646 / #1687 / #1694 / #1723). Companion antalya-26.1 frontports are still missing on antalya-26.3; chronic regression failures here are branch-level missing-dependency symptoms. Iceberg sort key timezone tests continue to fail with the same UNRECOGNIZED_ARGUMENTS: '--iceberg_partition_timezone' from a binary that doesn't expose the option.


CI on head 9d04f36e — failures

PR test workflow (2 failed checks, 42 success)

Check Test FAIL Class
Stateless tests (arm_asan, azure, parallel, 2/4) 00084_external_aggregation Pre-existing flake — 28 / 12 PRs / 90d
Stateless tests (arm_binary, sequential) 00157_cache_dictionary Pre-existing flake — 106 / 25 PRs / 90d

Regression workflow (10 failed checks)

Check Top failing tests on PR-1675 builds (30d) Baseline (antalya-26.3, 30d) Class
Swarms (Release + Aarch64) swarm sanity / cluster with only one observer node, swarm sanity / check scale up and down, swarm joins / join clause, swarm union (×4 each) 30–49% on every PR Pre-existing broken
S3Export (partition) (Release + Aarch64) sanity / mismatched columns (×4) 50% Pre-existing broken
Iceberg (1) (Release + Aarch64) rest catalog / sort key timezone / day transform positive utc offset, rest catalog / swarm / swarm examples (×4 each) 41% / chronic Missing-dep + pre-existing
Iceberg (2) (Release + Aarch64) glue catalog / swarm / swarm examples (×4) chronic Pre-existing
Parquet (Release + Aarch64) postgresql/mysql round-trip compression-type variants (×4 each) ~36% Pre-existing flaky

Regression DB on /PRs/1675/ builds (30d): 699 Fail / 44,007 OK ≈ 1.6%. Every top failure matches the all-PR baseline fail rate on antalya-26.3.


Related to PR diff?

PR is a 4-line guard in DataLakeCatalog — avoid scanning the full catalog when computing UNKNOWN_TABLE typo-suggestion hints (1 file changed). Touches only the error-path of getTable* for data-lake catalogs.

Failing test Diff overlap Related?
00084_external_aggregation, 00157_cache_dictionary none No
swarms / *, parquet / *, s3_export_partition / * none (data-lake-catalog typo hints ≠ any of these) No
iceberg / sort key timezone / * none — failure is UNRECOGNIZED_ARGUMENTS, missing-dep No
iceberg / swarm / swarm examples (rest + glue) none — the change is on the typo-hint code path, not the swarm/iceberg integration No

No failing test intersects the typo-hint code path or fails above the all-PR baseline.


Local checkout

cd /Users/alsugilyazova/workspace/altinity-clickhouse/ClickHouse
gh pr checkout 1675 --repo Altinity/ClickHouse
# HEAD: 9d04f36ed7d7adbae5b146f8bee1389450392e1e

@alsugiliazova alsugiliazova added the verified Approved for release label May 11, 2026
@alsugiliazova
Copy link
Copy Markdown
Member

Audit Report — PR #1675

Confirmed Defects

No confirmed defects in reviewed scope.

@svb-alt svb-alt added port-antalya PRs to be ported to all new Antalya releases forwardport This is a frontport of code that existed in previous Antalya versions labels May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

antalya-26.3 forwardport This is a frontport of code that existed in previous Antalya versions port-antalya PRs to be ported to all new Antalya releases releasy Created/managed by RelEasy verified Approved for release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants