Repository navigation
Conversation
Add a new system table that exposes settings for all table engines, not just MergeTree. Introduces FillEngineSettingsFn in StorageFactory and the StorageSystemEngineSettings class. Engines with no registered fill function are skipped, so the table is empty until engines wire in.
Register fillEngineSettingsColumns for 18 engine settings classes (MergeTree, Memory, Distributed, Kafka, RabbitMQ, NATS, MySQL, PostgreSQL, RocksDB, ObjectStorage, etc.) so they appear in system.engine_settings.
Basic stateless test verifying the table exists, has the engine_name column, and returns settings for known engines. Also wire DataLakeStorageSettings which was missed in the previous commit.
|
@cla-assistant check |
|
@kaijaytu — a heads-up, and thanks for this. @nikitamikhaylov asked me to take this over while I work on Rebased onto current master it turned out On top of your commits I've added the missing enum name, migrated the fill hook onto a per-struct Two things came out of that which are yours as much as mine:
Should either table emit alias rows? Deliberately not decided, partly because one of the two Whichever way it is settled, both tables should match: either both gain alias rows, which means
It is raised as an open question in the new PR with the evidence and both costs. Your view would be Two things about where this leaves your PR, and I'd rather be plain about both. The work is going out as one pull request rather than two: But please don't close this one on my account. Mine is a test task submitted as part of a job I'd welcome your review — and @Ergus, you offered to review on #59913, so likewise. |
|
@kaijaytu Thanks for the contribution! As discussed in #116543 (comment), this work will be continued in #118544 |
Review: ClickHouse#118544⚠️ Changes user-visible column descriptions of `system.merge_tree_settings`, which predates this pull request. Kept on a side branch pending a maintainer's approval of the unified wording. `system.engine_settings`, `system.merge_tree_settings` and `system.table_settings` carry the same thirteen columns - `name`, `value`, `default`, `changed`, `description`, `min`, `max`, `disallowed_values`, `readonly`, `type`, `is_obsolete`, `tier`, `alias_for` - and each declared and wrote them itself. `SettingsTableColumns` now does both: - `sharedSettingColumns` declares them. `engine_settings` prepends `engine_name`, `merge_tree_settings` uses them as they are, `table_settings` wraps them in `database`/`table`/`engine` and `source`/`is_masked`, via `ColumnsDescription::add`. - `insertSharedSettingColumns` writes them, in the order `sharedSettingColumns` declares. Before, the writer could only assume an order that each table declared independently; now the declaration and the writer sit side by side. The descriptions are worded as facts about a setting rather than about a table, so one text reads correctly in all three: "Only `MergeTree` settings can be constrained" is true everywhere, where "Empty for every engine other than `MergeTree`" read oddly in a single-family table. The original `system.engine_settings` pull request (ClickHouse#113269) had copied `system.merge_tree_settings`' wording verbatim, so sharing it restores what was intended. Two of the changes are corrections: `readonly` no longer implies it covers `ALTER` permission, and `changed` now says that assigning a setting the value it already had counts. `system.table_settings` overrides two, through `ColumnsDescription::modify`: `value`, which only there can be a masked placeholder, and `tier`, which only there is reported for a setting known solely from a `SETTINGS` clause. Verified on a running server rather than by tests, since no test asserts column descriptions: - `system.merge_tree_settings` and `system.engine_settings` restricted to `MergeTree` still differ in zero rows across all thirteen columns, both ways; - column order is unchanged in all three tables; - of the thirteen shared columns, only `value` and `tier` have more than one description, and the second text is on `system.table_settings` in both cases.⚠️ Not a size reduction: 204 lines removed, 223 added, net +19. The shared unit is 147 lines once its doc comments and includes are counted, and `system.table_settings` keeps its two overrides and a named helper for the long `source` description. What this buys is one definition of the columns instead of three. Related: ClickHouse#59913 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01VM7vZavJcWGZ9DCuoA5oHW
Add a new system.engine_settings system table that exposes settings for all table engines, not just MergeTree. The table has the same structure as system.merge_tree_settings plus an engine_name column, allowing users to discover available settings for any engine via SQL.
Closes: #59913
Changelog category (leave one):
New Feature
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Added system.engine_settings table that shows all available settings for every table engine (Memory, Kafka, Distributed, RocksDB, etc.), not just MergeTree.