Uh oh!
There was an error while loading. Please reload this page.
[fix](view)Fix show create view not display column_definition - #55819
Conversation
Thearas
commented
Sep 9, 2025
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
zddr
commented
Sep 9, 2025
run buildall |
hello-stephen
commented
Sep 9, 2025
FE UT Coverage ReportIncrement line coverage |
doris-robot
commented
Sep 9, 2025
TPC-H: Total hot run time: 34841 ms |
doris-robot
commented
Sep 9, 2025
TPC-DS: Total hot run time: 188572 ms |
doris-robot
commented
Sep 9, 2025
ClickBench: Total hot run time: 30.19 s |
hello-stephen
commented
Sep 9, 2025
FE Regression Coverage ReportIncrement line coverage |
zddr
commented
Sep 10, 2025
run buildall |
doris-robot
commented
Sep 10, 2025
TPC-H: Total hot run time: 34903 ms |
doris-robot
commented
Sep 10, 2025
TPC-DS: Total hot run time: 189560 ms |
doris-robot
commented
Sep 10, 2025
ClickBench: Total hot run time: 29.4 s |
hello-stephen
commented
Sep 10, 2025
FE UT Coverage ReportIncrement line coverage |
hello-stephen
commented
Sep 10, 2025
FE Regression Coverage ReportIncrement line coverage |
zddr
commented
Sep 10, 2025
run cloud_p0 |
hello-stephen
commented
Sep 10, 2025
FE Regression Coverage ReportIncrement line coverage |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
…s in SHOW CREATE VIEW ### What problem does this PR solve? Issue Number: None Related PR: apache#55819 Problem Summary: The SHOW CREATE VIEW column-list quoting fix (SqlUtils.getIdentSql in Env.addColNameAndComment) changes the emitted DDL: every view column name in the column definition list is now backtick-quoted, e.g. (user_id,cost) becomes (`user_id`,`cost`). The 7 affected regression .out files are regenerated accordingly, and the hardcoded assertion in mtmv_p0/test_show_create_mtmv is updated to expect the quoted column list (`aa` comment 'aa_comment',`bb`). The replica-3 golden blocks in test_show_create_table_and_views_nereids.out are unchanged by this PR and are preserved. ### Release note None ### Check List (For Author) - Test: Regression test (all 8 listed suites run with -forceGenOut to regenerate, then re-run without the flag and verified passing) - Behavior changed: No (test-only changes) - Does this need documentation: No
### What problem does this PR solve? Issue Number: None Related PR: #55819 Problem Summary: When a view is created with a column name containing special characters (e.g. `create view v as select 1 as '(第一列)'` with enable_unicode_name_support enabled), SHOW CREATE VIEW emits an unquoted column definition list like `((第一列))` — the outer parens are the list, the inner `(第一列)` is the raw column name emitted without backtick quoting. The generated DDL is not re-executable: the CREATE VIEW column list grammar requires an identifier (DorisParser.g4 simpleColumnDef -> identifier), and an unquoted name with parens fails to parse (`mismatched input '第一列'`). The column list itself was introduced by #55819 to preserve explicit column definitions/comments in SHOW CREATE VIEW, but Env.addColNameAndComment (Env.java) emitted column names verbatim. Fix: quote every column name with SqlUtils.getIdentSql (backtick-quoting with embedded-backtick escaping) and escape single quotes in column comments. After the fix SHOW CREATE VIEW outputs `CREATE VIEW `v` (`(第一列)`) AS select 1 as `(第一列)`;` which is valid SQL and round-trips.
…e#66467) ### What problem does this PR solve? Issue Number: None Related PR: apache#55819 Problem Summary: When a view is created with a column name containing special characters (e.g. `create view v as select 1 as '(第一列)'` with enable_unicode_name_support enabled), SHOW CREATE VIEW emits an unquoted column definition list like `((第一列))` — the outer parens are the list, the inner `(第一列)` is the raw column name emitted without backtick quoting. The generated DDL is not re-executable: the CREATE VIEW column list grammar requires an identifier (DorisParser.g4 simpleColumnDef -> identifier), and an unquoted name with parens fails to parse (`mismatched input '第一列'`). The column list itself was introduced by apache#55819 to preserve explicit column definitions/comments in SHOW CREATE VIEW, but Env.addColNameAndComment (Env.java) emitted column names verbatim. Fix: quote every column name with SqlUtils.getIdentSql (backtick-quoting with embedded-backtick escaping) and escape single quotes in column comments. After the fix SHOW CREATE VIEW outputs `CREATE VIEW `v` (`(第一列)`) AS select 1 as `(第一列)`;` which is valid SQL and round-trips.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)