Skip to content

Backport #127627 to 26.3: Check the source table SELECT grant in parallel_distributed_insert_select - #129133

Merged
PedroTadim merged 2 commits into
26.3from
backport/26.3/127627
Nov 4, 2026
Merged

PedroTadim merged 2 commits into
26.3from
backport/26.3/127627

Conversation

@robot-clickhouse-ci-1

Copy link
Copy Markdown
Contributor

Original pull-request #127627
Cherry-pick pull-request #128867

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix labels Nov 3, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [35986b4]

Summary: ✅

On 26.3 the regular `INSERT ... SELECT` path does not reject a row policy
defined on a `Distributed` table with `ILLEGAL_PREWHERE` (that fail-closed
behavior came to master later, in an unrelated change), so the test failed
in every configuration. Detect the fallback from the optimized rewrite by
the kind of the secondary queries in `system.query_log` instead: the
regular path sends a `SELECT` to the shard, the optimized rewrite sends
only an `INSERT ... SELECT`. Truncate the destination afterwards so the
`additional_table_filters` case is independent of the copied row.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=129133&sha=138bd38da5a8e5e12a650b474088bc93e775d5d0&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan%2C%20distributed%20plan%2C%20parallel%2C%201%2F2%29
PR: #129133

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@PedroTadim
PedroTadim merged commit 3af9425 into 26.3 Nov 4, 2026
36 checks passed
@PedroTadim
PedroTadim deleted the backport/26.3/127627 branch November 4, 2026 09:17
leshikus pushed a commit that referenced this pull request Nov 13, 2026
On 26.3 the regular `INSERT ... SELECT` path does not reject a row policy
defined on a `Distributed` table with `ILLEGAL_PREWHERE` (that fail-closed
behavior came to master later, in an unrelated change), so the test failed
in every configuration. Detect the fallback from the optimized rewrite by
the kind of the secondary queries in `system.query_log` instead: the
regular path sends a `SELECT` to the shard, the optimized rewrite sends
only an `INSERT ... SELECT`. Truncate the destination afterwards so the
`additional_table_filters` case is independent of the copied row.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=129133&sha=138bd38da5a8e5e12a650b474088bc93e775d5d0&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan%2C%20distributed%20plan%2C%20parallel%2C%201%2F2%29
PR: #129133

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants