-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](nereids) Fix not check column name when create or alter view #42206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
morrySnow
merged 1 commit into
apache:master
from
seawinde:fix_view_column_name_not_check
Oct 23, 2024
Merged
[fix](nereids) Fix not check column name when create or alter view #42206
morrySnow
merged 1 commit into
apache:master
from
seawinde:fix_view_column_name_not_check
Oct 23, 2024
Conversation
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
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
Contributor
Author
|
run buildall |
feiniaofeiafei
approved these changes
Oct 23, 2024
Contributor
|
PR approved by anyone and no changes requested. |
morrySnow
approved these changes
Oct 23, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
seawinde
added a commit
to seawinde/doris
that referenced
this pull request
Oct 23, 2024
…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)
seawinde
added a commit
to seawinde/doris
that referenced
this pull request
Oct 23, 2024
…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)
yiguolei
pushed a commit
that referenced
this pull request
Oct 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
approved
Indicates a PR has been approved by one committer.
cir
dev/2.1.7-merged
dev/3.0.3-merged
p0_b
reviewed
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.
Proposed changes
This is brought by #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}$'and if run create view sql as following, should success:
and the schema of view2 should be