Skip to content

Apply target row policies to Alias tables - #116290

Merged
yariks5s merged 5 commits into
ClickHouse:masterfrom
nauu:fix_row_policy
Sep 2, 2026
Merged

yariks5s merged 5 commits into
ClickHouse:masterfrom
nauu:fix_row_policy

Conversation

@nauu

@nauu nauu commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Alias delegates reads to its target table, but row policies were previously resolved only for the Alias table itself. As a result, policies defined on the target table could be skipped, including for queries eligible for trivial-count optimization.

Resolve row policies for combine both the Alias and its target.

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fixed Alias tables ignoring row policies defined on its target tables. Alias now combine the row policies of both the Alias and its target.


Workflow [PR]
Sync PR [sync-upstream/pr/116290]

@nauu nauu added the can be tested Allows running workflows for external contributors label Aug 25, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [63962fc]

Summary: ✅


AI Review

Summary

This PR makes Alias reads apply the effective SELECT row policy of both the alias and its target, and it also covers the two sibling paths that were previously still bypassing that rule: Merge children matched through an alias and the text-index trivial-count rewrite. I reviewed the current diff and the resolved review threads against the current head and did not find any remaining correctness or safety issues that warrant a new inline finding.

Final Verdict

✅ No blocking or major issues found in the current diff.

LLVM Coverage Report

Metric Baseline Current Δ
Lines 87.30% 87.30% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 79.40% 79.50% +0.10%

Changed lines: Changed C/C++ lines covered: 31/33 (93.94%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Aug 25, 2026
@yariks5s yariks5s self-assigned this Aug 25, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 63962fc12 with master 82cfa6a42 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 710.22 MiB 707.19 MiB -3.04 MiB (-0.43%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

Compile time of recompiled translation units

146 translation units recompiled, 1156 s compile time in total, 146 of them have a recent master baseline.

Job report

@nauu

nauu commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Hi @yariks5s, all tests passed, could you help to merge it, thx.

@yariks5s

yariks5s commented Sep 2, 2026

Copy link
Copy Markdown
Member

Hi! Looks good to me, let's merge

@yariks5s
yariks5s added this pull request to the merge queue Sep 2, 2026
Merged via the queue into ClickHouse:master with commit 6224130 Sep 2, 2026
179 checks passed
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 2, 2026
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-bugfix Pull request with bugfix, not backported by default 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