Repository navigation
Preserve quoting for TOP column names in metadata - #118754
alexey-milovidov merged 1 commit into
Conversation
|
Workflow [PR], commit [dddfc6e] Summary: ✅
AI ReviewSummaryThis PR adds Findings❌ Blockers
Tests
Final Verdict❌ Changes requested: the patch prevents writing new broken metadata, but it does not fix loading already persisted broken metadata, which is the user-visible compatibility problem described by the PR. LLVM Coverage ReportMeasured on commit dddfc6e.
Changed lines: Changed C/C++ lines covered: 4/4 (100.00%) · Uncovered code |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units43 translation units recompiled, 116 s compile time in total, 43 of them have a recent master baseline. |
ReproducerCREATE TABLE top_src (`TOP` String) ENGINE = MergeTree ORDER BY `TOP`;
CREATE VIEW top_view (c String) AS
WITH a AS (SELECT `TOP` AS c FROM top_src)
SELECT c FROM a;
SHOW CREATE VIEW top_view;
-- Code: 62. DB::Exception: Syntax error (in file store/.../top_view.sql):
-- failed at position 116 (AS) ... Expected one of: token, OpeningRoundBracket, number. (SYNTAX_ERROR)
-- The view's metadata was written with a bare TOP, which re-parses as the `TOP <n>` clause.Results:
Backport the fix to CC component owner: @alexey-milovidov @vitlibar Analysis metadata
Introducing change: not identified
|
There is a bug in parser when TOP is used as column name.
After fix:
Also covers #106817
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix
SYNTAX_ERRORwhen loading views, materialized views, or projections whoseSELECTlist starts with a column namedTOP.Workflow [PR]
Sync PR [sync-upstream/pr/118754]
Version info
26.9.1.1313(included in26.9and later)