forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](nereids) Fix not check column name when create or alter view (a…
…pache#42206) This is brought by apache#32743 set enable_unicode_name_support = true; If run create view sql should fail beausel_shipdate column name contains invalid char '(' and ')', but now success this pr fix this and throw exception `ERROR 1105 (HY000): errCode = 2, detailMessage = Incorrect column name '(日期)'. Column regex is '^[_a-zA-Z@0-9\s/][.a-zA-Z0-9_+-/?@#$%^&*"\s,:]{0,255}$'` CREATE VIEW view1 AS SELECT "零售公司", l_shipdate as '(日期)', l_receiptdate as k2 FROM lineitem; and if run create view sql as following, should success: CREATE VIEW view2 AS SELECT "零售公司", l_shipdate as '日期', l_receiptdate as k2 FROM lineitem; and the schema of view2 should be mysql> desc view2; +-------------+-------------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-------+---------+-------+ | __literal_0 | varchar(16) | No | false | NULL | | | 日期 | date | No | false | NULL | | | k2 | date | No | false | NULL | | +-------------+-------------+------+-------+---------+-------+ 3 rows in set (0.01 sec)
- Loading branch information
Showing
5 changed files
with
75 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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