Repository navigation
Fix CTE column aliases for INTERSECT/EXCEPT queries - #110885
Merged
Merged
Conversation
Contributor
|
Workflow [PR], commit [0b2693f] Summary: ✅
AI ReviewSummaryThis PR fixes the alias-propagation gap identified in Final Verdict
|
Contributor
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 16/17 (94.12%) · Uncovered code |
Michicosun
approved these changes
Jul 31, 2026
Contributor
|
@yariks5s @Michicosun — ClickGap found the following in this PR:
Close anything that's wrong or already addressed. |
groeneai
added a commit
to groeneai/ClickHouse
that referenced
this pull request
Aug 12, 2026
ClickHouse#110885 landed the same buildSelectOrUnionExpression nested-union alias forwarding this branch carried, so the conflicting hunk is resolved to master's side and QueryTreeBuilder.cpp is left byte-identical to it. The remaining fix is the two toAST emission sites, which master does not have: the issue still reproduces on master at a96787f. Also drop the ignore_drop_queries_probability = 0 pins from the test, as requested on ClickHouse#112005.
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 of the changes that goes into CHANGELOG.md):
Fixes a case when using CTE column aliases with
INTERSECTorEXCEPTqueries, e.g.WITH t (a, b) AS (SELECT 1, 2 INTERSECT SELECT 1, 2) SELECT a, b FROM t, the query was failing with UNKNOWN_IDENTIFIER error. Closes #104770