Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

The simplifyUnionSelects function was incorrectly collapsing UNION ALL
queries when selects had identical expressions but different aliases.
ClickHouse's EXPLAIN AST output keeps all SELECT queries in a UNION,
so this optimization was incorrect.

Fixes test 00592_union_all_different_aliases.

The simplifyUnionSelects function was incorrectly collapsing UNION ALL
queries when selects had identical expressions but different aliases.
ClickHouse's EXPLAIN AST output keeps all SELECT queries in a UNION,
so this optimization was incorrect.

Fixes test 00592_union_all_different_aliases.
@kyleconroy kyleconroy merged commit aed1662 into main Dec 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants