Skip to content

Backport #123829 to 26.9: Do not read a JOIN input that cannot contribute under a WHERE no row passes - #124219

Merged
clickhouse-gh[bot] merged 3 commits into
26.9from
backport/26.9/123829
Oct 7, 2026
Merged

clickhouse-gh[bot] merged 3 commits into
26.9from
backport/26.9/123829

Conversation

@robot-ch-test-poll2

@robot-ch-test-poll2 robot-ch-test-poll2 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #123829

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

Version info

  • Merged into: 26.9.13.10

@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-backport Changes, backported to release branch. Do not use manually - automated use only! label Oct 6, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [6fdc0ee]

Summary: ✅

vdimir and others added 2 commits October 6, 2026 19:16
The previous commit declares `isSensitiveToEvaluationCount` in
`Optimizations/Utils.h`, but the file-static copy with the same body is
still in `optimizeJoin.cpp`, so that file does not compile ("static
declaration follows non-static declaration"). Remove the copy and keep
its comment for `canMergeExpressionIntoJoinGraph`, as #120510 does on
master.

Related: #123829

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

groeneai commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Fix for the build failure

The error on 13578f3 is the old file-static copy of isSensitiveToEvaluationCount at optimizeJoin.cpp:771, which has the same body as the one now in Utils (as in my reply on #123829: #123829 (comment)). The commit below removes it and keeps its comment for canMergeExpressionIntoJoinGraph, as #120510 does on master. Nothing else changes.

I checked exactly this tree on a local 26.9 debug build (clang-22): it builds; 05320_join_under_always_false_where_reads_nothing fails on 26.9 without #123829 and passes with it, also in 50 randomized runs; 05070_merge_expression_into_join_nondeterministic (the other caller) passes; 191 filter push-down and join tests show no new failure. It is a fast-forward of this branch.

I have triage but not push, so applying it needs someone with push access:

git fetch https://github.com/groeneai/ClickHouse groeneai/fix-26.9-backport-123829 && git push origin FETCH_HEAD:backport/26.9/123829

Commit 6fdc0ee84c5e.

@clickhouse-gh
clickhouse-gh Bot merged commit 735045d into 26.9 Oct 7, 2026
41 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.9/123829 branch October 7, 2026 14:04
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!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants