-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[behavior change](planner)change Doris's query organization syntax to standard sql #9745
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
Conversation
kpfly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by anyone and no changes requested. |
|
please add a ut that will throw exception when exist order/limit clause in select statement with union select id from a limit 10 union select id from b |
ea0a43e to
c558929
Compare
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…yntax to standard sql (apache#9745)" (apache#12135) Reverts apache#9745 This may cause NPE when calling `parseDefineExprWithoutAnalyze()`
…yntax to standard sql (apache#9745)" (apache#12135) Reverts apache#9745 This may cause NPE when calling `parseDefineExprWithoutAnalyze()`
…yntax to standard sql (apache#9745)" (apache#12135) Reverts apache#9745 This may cause NPE when calling `parseDefineExprWithoutAnalyze()`
Proposed changes
Issue Number: close #9740
Problem Summary:
Current, we process
order byandlimitin Doris only way:https://github.com/apache/incubator-doris/blob/d97e2b1eb21b1026ef95f0cb5b87e0138c704de8/fe/fe-core/src/main/cup/sql_parser.cup#L3174-L3191
We need to change it behavior to standard SQL. query organization need to be executed at last by default.
This PR changes syntax to match standard sql:
After applied this PR, All query organization will be executed at last. If you want it only affect on the last operand in operand set, you need to add parentheses on the last operand.
For example:
case 1, query organization only apply on last operand:
case 2, query organization only apply on global:
Checklist(Required)
Further comments
add unit test and regression test later