Repository navigation
Document access rights of the Merge table engine and the merge table function - #129730
Conversation
…ble function A `Merge` table and `merge` read only the matched tables that the current user can see (has `SHOW TABLES` on), and check `SELECT` only on those; a matched table the user cannot see is skipped without an error. Structure inference uses the same visibility filter and requires `SHOW COLUMNS`. The rule comes from ClickHouse#78339 and is asserted by `03400_merge_storage_underlying_tables_access_validation`. The owner chose to document it on ClickHouse#129597 instead of changing the behaviour. Add an `Access rights` section to both registration doc strings. The reference pages `docs/reference/engines/table-engines/special/merge.mdx` and `docs/reference/functions/table-functions/merge.mdx` are generated from these strings by the nightly docs autogeneration, so they are not edited here. Closes ClickHouse#129597 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 1 finding) plus my own review (1 finding).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261106-131100 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261106-124200 |
|
Workflow [PR], commit [938163c] Summary: ✅
AI ReviewSummaryDocuments the visibility filter and the Final Verdict✅ Approve. No changes required. No new inline comments posted; no local tests run for this documentation-only change. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units8 translation units recompiled, 31 s compile time in total, 8 of them have a recent master baseline. |
CI finish ledger - 3e3617eEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
The Session id: cron:our-pr-ci-monitor:20261106-173005 |
|
@Blargian can you or someone from your team review this docs PR? Seems small |
Closes: #129597
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Documented which privileges the
Mergetable engine and themergetable function need on the matched tables: data is read only from the matched tables that the user can see (hasSHOW TABLESon), andSELECTis checked on those tables.Description
Issue #129597 reports that a
Mergetable (ormerge) whose regexp matches a table the user has no privilege on returns the rows of the other tables without an error, while the same read fails withACCESS_DENIEDonce the user can see that table. This is intended:ReadFromMerge::getSelectedTablesreads only the matched tables on whichSHOW TABLESis granted and checksSELECTon those (moved into the engine by #78339, asserted by03400_merge_storage_underlying_tables_access_validation). A maintainer chose to document it rather than change it: #129597 (comment)This adds an
Access rightssection to the registration doc strings of theMergeengine and ofmerge: visible-only reads,SELECTon the columns read,SHOW COLUMNSwhen the structure is derived from the matched tables, and how to get every table read (or an error instead of a skip). The reference pagesdocs/reference/engines/table-engines/special/merge.mdxanddocs/reference/functions/table-functions/merge.mdxare generated from these strings by the nightly docs autogeneration, so they are not edited here.Validation: the new sections appear in
system.table_engines/system.table_functions, andautogenerate_docs.pyrun on both pages changes only these sections. Every sentence was checked on a server built from this branch with the setup from the issue (skip without error or warning,ACCESS_DENIEDafterGRANT SHOW TABLES, a full read afterGRANT SELECT,SHOW COLUMNSforDESCRIBEand forCREATEwithout a column list);03400and04514_table_functions_access_rights_rewritepass. The row-policyNOT_FOUND_COLUMN_IN_BLOCKmentioned in the issue does not reproduce on current master.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/129730]
Version info
26.11.1.1875-master(included in26.11and later)