Preserve ALIAS column order for distributed reads#94644
Merged
vdimir merged 2 commits intoClickHouse:masterfrom Jan 22, 2026
Merged
Preserve ALIAS column order for distributed reads#94644vdimir merged 2 commits intoClickHouse:masterfrom
vdimir merged 2 commits intoClickHouse:masterfrom
Conversation
Store ALIAS expressions in insertion order to keep output column ordering stable in distributed queries, and track alias names separately for membership checks.
1 task
vdimir
approved these changes
Jan 20, 2026
Contributor
|
Workflow [PR], commit [ea1def4] Summary: ❌
|
Contributor
Author
|
the "Bugfix validation" is checking @maxknv will you fix it? It's here: ClickHouse/ci/jobs/functional_tests.py Lines 621 to 626 in f611218 Maybe fixed here already: #94554 |
Merged
via the queue into
ClickHouse:master
with commit Jan 22, 2026
32e7ade
130 of 132 checks passed
zvonand
pushed a commit
to Altinity/ClickHouse
that referenced
this pull request
Jan 27, 2026
Preserve ALIAS column order for distributed reads
25 tasks
zvonand
added a commit
to Altinity/ClickHouse
that referenced
this pull request
Jan 28, 2026
25.8.15 Stable backport of ClickHouse#94644: Preserve ALIAS column order for distributed reads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a [user-readable short description]
Fixes a bug where certain distributed queries with
ORDER BYcould returnALIAScolumns with swapped values (i.e., columnashowing columnb’s data and vice versa).Documentation entry for user-facing changes
Preserve insertion order for ALIAS expressions to keep distributed output column order stable.
Closes #86227
The problem was caused by iteration over the unordered_map added in https://github.com/ClickHouse/ClickHouse/pull/59595/changes#r2707576468
with later addition in
#78097