Skip to content

Make structure of UnionStep idnetical for constant values. - #75715

Merged
KochetovNicolai merged 5 commits into
masterfrom
fix-constants-in-union-bug
Feb 12, 2025
Merged

KochetovNicolai merged 5 commits into
masterfrom
fix-constants-in-union-bug

Conversation

@KochetovNicolai

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Fix Block structure mismatch in QueryPipeline stream error for some queries with UNION ALL.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickhouse-gh

clickhouse-gh Bot commented Feb 7, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [8fac7c9]

@Avogar Avogar self-assigned this Feb 7, 2025
@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Feb 7, 2025
@KochetovNicolai
KochetovNicolai added this pull request to the merge queue Feb 12, 2025
Merged via the queue into master with commit 2969084 Feb 12, 2025
@KochetovNicolai
KochetovNicolai deleted the fix-constants-in-union-bug branch February 12, 2025 15:59
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 12, 2025
@nikitamikhaylov nikitamikhaylov added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Feb 20, 2025
robot-clickhouse added a commit that referenced this pull request Feb 20, 2025
robot-clickhouse added a commit that referenced this pull request Feb 20, 2025
robot-clickhouse added a commit that referenced this pull request Feb 20, 2025
robot-clickhouse-ci-1 added a commit that referenced this pull request Feb 20, 2025
Backport #75715 to 24.12: Make structure of UnionStep idnetical for constant values.
robot-ch-test-poll added a commit that referenced this pull request Feb 20, 2025
Backport #75715 to 25.1: Make structure of UnionStep idnetical for constant values.
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-backports-created-cloud deprecated label, NOOP label Feb 28, 2025
@robot-clickhouse robot-clickhouse added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Mar 10, 2025
@robot-clickhouse robot-clickhouse added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Jul 2, 2025
clickgapai pushed a commit to clickgapai/ClickHouse that referenced this pull request Oct 15, 2026
Both UNION ALL branches return a row with grade_name_id = 42 and the query
sorted only by grade_name_id, so the two rows tied. MergingSortedTransform
breaks ties by merge input index, so the output order depended on which
input carried which row; two unrelated PRs got the rows swapped in
Stateless tests (arm_binary, parallel) and (amd_debug, parallel).

Add `flag ASC NULLS FIRST` as a tiebreaker. The reference is unchanged, and
grade_name_id stays the first key so the union keeps the constant column
the test exists for (ClickHouse#75715): EXPLAIN PIPELINE header = 1 is identical and
EXPLAIN PLAN differs only in the sort description.

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-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud deprecated label, NOOP pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants