Skip to content

Fix: system.databases always shows data lake catalog databases - #103444

Merged
thevar1able merged 3 commits into
ClickHouse:masterfrom
alsugiliazova:fix-system-databases-datalake-filter
Apr 27, 2026
Merged

thevar1able merged 3 commits into
ClickHouse:masterfrom
alsugiliazova:fix-system-databases-datalake-filter

Conversation

@alsugiliazova

@alsugiliazova alsugiliazova commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor

system.databases now lists data lake catalog databases regardless of the show_data_lake_catalogs_in_system_tables setting.

The setting exists to prevent accidental expensive calls to remote catalog services (e.g. listing tables or columns). Knowing that a catalog database exists, however, requires no remote call — the DatabaseCatalog already keeps it in local memory. Hiding the database in system.databases based on that setting was inconsistent with SHOW DATABASES (which always showed catalogs since #89914) and confusing for users.

Changes:

  • StorageSystemDatabases::fillData now passes with_datalake_catalogs = true unconditionally.
  • InterpreterShowTablesQuery::execute no longer needs to force the setting for SHOW DATABASES (the rewrite to system.databases already returns the right result). The HACK is retained only for SHOW TABLES FROM <datalake_catalog> which still needs it.
  • Updated test_database_glue integration test to assert that system.databases shows the catalog even with the setting off.

Followup to: #89914

Changelog category (leave one):

  • Improvement

Changelog entry

SELECT * FROM system.databases now always lists data lake catalog databases regardless of the show_data_lake_catalogs_in_system_tables setting. Previously they were hidden by default, which was inconsistent with SHOW DATABASES that always showed them.

Version info

  • Merged into: 26.5.1.116

`system.databases` now lists data lake catalog databases regardless of
the `show_data_lake_catalogs_in_system_tables` setting.

The setting exists to prevent accidental expensive calls to remote
catalog services (e.g. listing tables or columns). Knowing that a
catalog database exists, however, requires no remote call — the
`DatabaseCatalog` already keeps it in local memory. Hiding the
database in `system.databases` based on that setting was inconsistent
with `SHOW DATABASES` (which always showed catalogs since ClickHouse#89914) and
confusing for users.

Changes:
- `StorageSystemDatabases::fillData` now passes
  `with_datalake_catalogs = true` unconditionally.
- `InterpreterShowTablesQuery::execute` no longer needs to force the
  setting for `SHOW DATABASES` (the rewrite to `system.databases`
  already returns the right result). The HACK is retained only for
  `SHOW TABLES FROM <datalake_catalog>` which still needs it.
- Updated `test_database_glue` integration test to assert that
  `system.databases` shows the catalog even with the setting off.

Followup to: ClickHouse#89914

Made-with: Cursor
@thevar1able thevar1able added the can be tested Allows running workflows for external contributors label Apr 23, 2026
@clickhouse-gh

clickhouse-gh Bot commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [cb80bb7]

Summary: ✅


AI Review

Summary

This PR makes system.databases always include data lake catalog databases, independent of show_data_lake_catalogs_in_system_tables, and removes now-unnecessary SHOW DATABASES setting override logic. I did not find correctness, safety, or performance issues that require changes.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Apr 23, 2026
@clickhouse-gh

clickhouse-gh Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 83.80% 83.80% +0.00%
Functions 91.10% 91.10% +0.00%
Branches 76.20% 76.20% +0.00%

Changed lines: 100.00% (13/13) · Uncovered code

Full report · Diff report

@alsugiliazova

Copy link
Copy Markdown
Contributor Author

@thevar1able fails look like CI issues, can you please check? Should I merger master again?

@thevar1able

This comment was marked as outdated.

@thevar1able
thevar1able added this pull request to the merge queue Apr 27, 2026
Merged via the queue into ClickHouse:master with commit dad7a28 Apr 27, 2026
321 of 324 checks passed
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 27, 2026
pull Bot pushed a commit to Dream-hu/ClickHouse that referenced this pull request Apr 27, 2026
PR ClickHouse#103444 changed `system.databases` to always list data lake catalog
databases regardless of the `show_data_lake_catalogs_in_system_tables`
setting: the database name is local metadata and never requires a call
to the external catalog. The setting still gates `system.tables`,
`system.columns`, `system.iceberg_history`, etc.

Update the assertion to match the new contract: the catalog DB is
visible in `system.databases` for both setting values.
pull Bot pushed a commit to Dream-hu/ClickHouse that referenced this pull request Apr 27, 2026
…w-data-lake-catalogs-setting

Fix test_show_data_lake_catalogs_setting after ClickHouse#103444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-improvement Pull request with some product improvements pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants