Skip to content

Cherry pick #107053 to 26.4: Fix Virtual row with union produces wrong result - #110803

Merged
robot-clickhouse-ci-1 merged 10 commits into
backport/26.4/107053from
cherrypick/26.4/107053
Jul 20, 2026
Merged

robot-clickhouse-ci-1 merged 10 commits into
backport/26.4/107053from
cherrypick/26.4/107053

Conversation

@robot-ch-test-poll2

Copy link
Copy Markdown
Contributor

Original pull-request #107053

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.

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

@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 pr-bugfix Pull request with bugfix, not backported by default labels Jul 17, 2026
@robot-ch-test-poll

Copy link
Copy Markdown
Contributor

Dear @vdimir, @nihalzp, this cherry-pick PR has not been updated for 3d0h9m13s. Please resolve the conflicts to backport #107053, or close this PR if the backport is no longer needed. This PR will be automatically closed after 7 days of inactivity.

@zlareb1

zlareb1 commented Jul 20, 2026

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

…ypick/26.4/107053

# Conflicts:
#	src/Processors/Merges/Algorithms/MergingSortedAlgorithm.cpp
#	src/Processors/QueryPlan/Optimizations/optimizeReadInOrder.cpp

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts in commit 65c3e1b.

MergingSortedAlgorithm.cpp: Dropped the two #ifndef NDEBUG blocks from initialize and consume that referenced rememberVirtualRowBoundary, checkVirtualRowBoundary, and virtual_row_boundary — these debug utilities don't exist in the 26.4 codebase.

optimizeReadInOrder.cpp: Kept the HEAD fix: virtual_row_readers tracking to undo per-child virtual rows when the union-wide merge can't use them, resetVirtualRowConversions, and passing apply_virtual_row (instead of false) to convertToFinishSorting.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ vdimir
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI requested a review from zlareb1 July 20, 2026 11:00
@robot-clickhouse-ci-1
robot-clickhouse-ci-1 merged commit 39be9cb into backport/26.4/107053 Jul 20, 2026
1 check passed
@robot-clickhouse-ci-1
robot-clickhouse-ci-1 deleted the cherrypick/26.4/107053 branch July 20, 2026 11:02
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-bugfix Pull request with bugfix, not backported by default 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.

8 participants