Repository navigation
Fix qualified matcher resolve with non-compound column clash - #109078
Conversation
Fixed an error when using a qualified asterisk like `b.*` in a query where `b` is a table (or subquery/CTE) alias that shares its name with a non-compund column of another table. Such queries no longer fail and correctly select all columns of b.
|
Workflow [PR], commit [1dbb590] Summary: ✅
AI ReviewSummaryThis PR fixes the qualified-matcher case where PR Metadata
Final VerdictStatus: ✅ Approve |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 39/40 (97.50%) · Uncovered code |
|
📊 Cloud Performance Report ✅ AI verdict: This PR is an analyzer-only fix: it changes how a qualified matcher (alias.*) resolves when a column and a table share the same name, affecting query analysis, not execution. None of the flagged ClickBench (Q13/Q14/Q15/Q30) or TPC-H (Q2/Q7/Q8) queries use that construct, so neither the flagged regressions nor the improvements can plausibly be caused by this change. With opposite-direction deltas across benchmarks and only 6 source runs against 30 baseline runs, these are consistent with run-to-run variance, so all flagged queries were downgraded. No actionable performance impact from this change. clickbenchFlagged queries (5 of 43)
q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_officialFlagged queries (3 of 22)
q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. Debug info
|
jkartseva
left a comment
There was a problem hiding this comment.
Please fix the buffer over-read.
|
Sorry, that^ was from another review. |
|
s/non-compund/non-compound in the changelog entry |
|
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment. TL;DRFix qualified matcher resolve with non-compound column clash ClickGap verified: reproduced it with the script below on ReproductionCREATE TABLE t1 (a UInt32, b Float64) ENGINE = MergeTree ORDER BY a;
CREATE TABLE t2 (x UInt32, y String) ENGINE = MergeTree ORDER BY x;
INSERT INTO t1 VALUES (1, 3.14);
INSERT INTO t2 VALUES (1, 'hello');
SET enable_analyzer = 1;
-- `b` also names the scalar column t1.b (Float64); `b.*` must expand the table aliased `b` (t2).
SELECT a, b.* FROM t1 JOIN t2 AS b ON t1.a = b.x ORDER BY a;
-- Before the fix: fails with UNSUPPORTED_METHOD "Qualified matcher b.* found a non-compound expression t1.b with type Float64".
-- After the fix: returns 1 1 helloBisect
Affects
Suggested next stepThe fix has landed on master; the affected release branches above still need the backport. Component: ClickGap · Finding: Triage metadata
|
|
Hi — this looks like a backport candidate for |
…fied-matcher-alias-over-column Fix qualified matcher resolve with non-compound column clash
Backport #109078 to 26.6: Fix qualified matcher resolve with non-compound column clash
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
b.*in a query wherebis a table (or subquery/CTE) alias that shares its name with a non-compound column of another table. Such queries no longer fail and correctly select all columns of b.Closes: #82151
Version info
26.7.1.854(included in26.7and later)26.6.8.7