Skip to content

Cherry pick #132104 to 26.10: Keep the identity of a set in the cache key of an expression - #132414

Merged
nickitat merged 3 commits into
backport/26.10/132104from
cherrypick/26.10/132104
Nov 17, 2026
Merged

nickitat merged 3 commits into
backport/26.10/132104from
cherrypick/26.10/132104

Conversation

@robot-ch-test-poll2

Copy link
Copy Markdown
Contributor

Original pull-request #132104

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

nickitat and others added 2 commits November 16, 2026 18:44
The cache key of an expression is written by `ActionsDAG::serialize` with
`for_cache_key`, which leaves out the names the plan build chose, and
`isConstantValueInCacheKey` leaves out the value of a set. The set was told apart
only by its `__set_<hash>` name, so `v IN (1, 2, 3)` and `v IN (5, 6, 7)`
computed in an expression got one key, and automatic parallel replicas decided
one query from the statistics collected for the other. Write the set:
`serializeConstant` writes only its hash, as `Node::updateHash` keeps it for the
same reason. A filter was not affected, because its predicate is keyed through
`getOutputIdentity`.

Split out of #125687.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the identity of a set in the cache key of an expression
@robot-ch-test-poll2 robot-ch-test-poll2 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels Nov 17, 2026
@nickitat

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

…rypick/26.10/132104

# Conflicts:
#	src/Interpreters/ActionsDAG.cpp

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the conflict and merged backport/26.10/132104 in commit d33c008f6. The PR is now mergeable.

Copilot AI requested a review from nickitat November 17, 2026 17:22
@nickitat
nickitat merged commit 19b4004 into backport/26.10/132104 Nov 17, 2026
2 checks passed
@nickitat
nickitat deleted the cherrypick/26.10/132104 branch November 17, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants