Skip to content

Cherry pick #107041 to 26.4: Fix Block structure mismatch in UnionStep on a Sparse-vs-full divergent branch - #108171

Merged
robot-ch-test-poll4 merged 3 commits into
backport/26.4/107041from
cherrypick/26.4/107041
Jun 22, 2026
Merged

robot-ch-test-poll4 merged 3 commits into
backport/26.4/107041from
cherrypick/26.4/107041

Conversation

@robot-ch-test-poll4

Copy link
Copy Markdown
Contributor

Original pull-request #107041

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

groeneai and others added 3 commits June 17, 2026 10:46
Per review (KochetovNicolai): a Sparse column is structurally equal to the full
column of the same type it wraps, and every consumer can process sparse, so it
must compare equal to a non-sparse column even in the strict structure check.

Unwrap ColumnSparse on both sides in the shared checkColumnStructure primitive
(used by assertBlocksHaveEqualStructure / blocksHaveEqualStructure) even when
allow_materialize is false. Const and Replicated stay strict unless
allow_materialize.

This fixes the #107273 sparse-vs-full `Block structure mismatch in UnionStep
stream` (one branch reads a mostly-default Bool column Sparse, the sibling full,
under a materialized view's UNION) at both check sites through the primitive: the
plan-construction check in UnionStep::updateOutputHeader and the debug-only
checkHeaders after liftUpUnion in optimizeTree.cpp, with no step-specific code.

Closes #107273

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…r-mismatch-106956

Fix Block structure mismatch in UnionStep on a Sparse-vs-full divergent branch
@robot-ch-test-poll4 robot-ch-test-poll4 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 Jun 22, 2026
@robot-ch-test-poll4
robot-ch-test-poll4 merged commit 0aa1103 into backport/26.4/107041 Jun 22, 2026
@robot-ch-test-poll4
robot-ch-test-poll4 deleted the cherrypick/26.4/107041 branch June 22, 2026 16:06
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.

4 participants