Repository navigation
Support query parameters as user/role name in most contexts - #109696
Conversation
|
Workflow [PR], commit [09b1f69] Summary: ✅
AI ReviewSummaryThis PR extends query-parameter support across access-management statements by keeping parameterized user/role name subtrees reachable through parsing, cloning, formatting, and attach-definition validation. I re-checked the current diff and all prior review threads against the latest code, and I did not find any remaining correctness or contract gaps in the currently advertised scope. Final Verdict✅ No new findings. LLVM Coverage ReportMeasured on commit 09b1f69.
Changed lines: Changed C/C++ lines covered: 490/544 (90.07%) · Uncovered code |
a7f140b to
0e2b136
Compare
0e2b136 to
d1b6668
Compare
edcfda3 to
5b0311b
Compare
79a848c to
b1d7681
Compare
a9f996c to
c78398a
Compare
bdc5748 to
664d5b5
Compare
664d5b5 to
b0ea111
Compare
b0ea111 to
a510839
Compare
a510839 to
1ccf533
Compare
1ccf533 to
d5484a5
Compare
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes55 object files changed (+132.11 KiB total), 0 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units232 translation units recompiled, 1544 s compile time in total, 232 of them have a recent master baseline. Median compile-time ratio to the baselines is ×1.05 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio. |
|
@groeneai investigate if CI failure is relevant and if not has issue or fixing PR |
|
Not relevant to your change. One red, and it aborts in the previous-release binary, not in yours.
The reported name, Two facts put it outside your diff:
Root cause, from this run's
Fixing PR: #114826 ("Hold the table lock across a lightweight UPDATE pipeline"), open, mine. It parks the shared lock in the pipeline's resource holder the way For scope: in the last 30 days this signature fired on 6 pull requests and 0 times on master, always in |
d5484a5 to
db82598
Compare
|
@pufit can you check it? |
|
Found this, probably worth fixing too Otherwise looks good |
8f880be to
a917464
Compare
59891b1 to
3881f91
Compare
|
📊 Cloud Performance Report ✅ AI verdict: This PR lets CREATE/ALTER ROLE, CREATE USER, DROP USER/ROLE and GRANT accept query parameters, and rejects query parameters in stored access entity definitions. It does not touch query planning, aggregation or scans. Six ClickBench GROUP BY queries were slower (Q16 +17.1%, Q32 +17.5%, Q33 +12.6%, Q17 +10.3%, Q34 +8.8%, Q28 +6.5%). Each PR result is still inside master's recent range, so the automatic checks already marked them not_sure. That decision fits both the diff and the data. The slowdown hitting only aggregation queries, with both PR ClickBench runs on the same machine, points to machine variance rather than this change. No action is needed on the performance side. clickbenchFlagged queries (6 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 No significant changes Debug info
|
da68450 to
8e4b82f
Compare
8e4b82f to
09b1f69
Compare
The load-time check `checkAccessEntityHasNoQueryParameters` uses
`analyzeReceiveQueryParams`, which now also visits row policy filters and
masking policy expressions. A row policy stored by an older version with an
unsubstituted parameter in its filter (`USING k = {x:UInt64}`) was then
rejected while loading the access storage:
- on a normal restart every query of every user failed with
INCORRECT_ACCESS_ENTITY_DEFINITION, because the row policy cache reads all
policies;
- on a rebuild of the lists (`need_rebuild_lists.mark`, SYSTEM RELOAD USERS)
the policy was skipped and dropped from the lists, so the rows it hid
became readable.
Skip policy definitions in that check, as before: such a policy loads again
and reading its table fails with UNKNOWN_QUERY_PARAMETER.
Found by the AI review of ClickHouse#122688 after the merge with ClickHouse#109696.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #109298
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Query parameters can now be used for primary
USERandROLEnames inCREATE,ALTER, andDROP, and for role and grantee names inGRANTandREVOKE, e.g.GRANT {role:Identifier} TO {user:Identifier}.Workflow [PR]
Sync PR [sync-upstream/pr/109696]
Version info
26.10.1.1015-master(included in26.10and later)