-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ESQL: Remove duplicated nested commands #123085
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
Changes from all commits
c5e5c67
ae49daf
b43adec
ac88366
1553c97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| pr: 123085 | ||
| summary: Remove duplicated nested commands | ||
| area: ES|QL | ||
| type: bug | ||
| issues: [] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -195,14 +195,12 @@ IN: 'in'; | |
| IS: 'is'; | ||
| LAST : 'last'; | ||
| LIKE: 'like'; | ||
| LP : '('; | ||
| NOT : 'not'; | ||
| NULL : 'null'; | ||
| NULLS : 'nulls'; | ||
| OR : 'or'; | ||
| PARAM: '?'; | ||
| RLIKE: 'rlike'; | ||
| RP : ')'; | ||
| TRUE : 'true'; | ||
|
|
||
| EQ : '=='; | ||
|
|
@@ -223,8 +221,6 @@ LEFT_BRACES : '{'; | |
| RIGHT_BRACES : '}'; | ||
|
|
||
| NESTED_WHERE : WHERE -> type(WHERE); | ||
| NESTED_SORT : {this.isDevVersion()}? SORT -> type(SORT); | ||
| NESTED_LIMIT : {this.isDevVersion()}? LIMIT -> type(LIMIT); | ||
|
Comment on lines
-226
to
-227
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These cause parsing error since commands don't need to be nested. WHERE is declared here for the STATS avg() WHERE declaration -WHERE inside a command.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. Thank you. |
||
|
|
||
| NAMED_OR_POSITIONAL_PARAM | ||
| : PARAM (LETTER | UNDERSCORE) UNQUOTED_ID_BODY* | ||
|
|
@@ -239,6 +235,9 @@ NAMED_OR_POSITIONAL_PARAM | |
| OPENING_BRACKET : '[' -> pushMode(EXPRESSION_MODE), pushMode(EXPRESSION_MODE); | ||
| CLOSING_BRACKET : ']' -> popMode, popMode; | ||
|
|
||
| LP : '(' -> pushMode(EXPRESSION_MODE), pushMode(EXPRESSION_MODE); | ||
| RP : ')' -> popMode, popMode; | ||
|
|
||
| UNQUOTED_IDENTIFIER | ||
| : LETTER UNQUOTED_ID_BODY* | ||
| // only allow @ at beginning of identifier to keep the option to allow @ as infix operator in the future | ||
|
|
@@ -678,8 +677,8 @@ INSIST_MULTILINE_COMMENT : MULTILINE_COMMENT -> channel(HIDDEN); | |
| // | ||
| mode FORK_MODE; | ||
| FORK_LP : LP -> type(LP), pushMode(DEFAULT_MODE); | ||
| FORK_RP : RP -> type(RP), popMode; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The popup mode should already be completed by the sub fork, otherwise the mode stack is not completed, causing non-first subqueries to fail (since parsing is executed in a different mode). |
||
| FORK_PIPE : PIPE -> type(PIPE), popMode; | ||
|
|
||
| FORK_WS : WS -> channel(HIDDEN); | ||
| FORK_LINE_COMMENT : LINE_COMMENT -> channel(HIDDEN); | ||
| FORK_MULTILINE_COMMENT : MULTILINE_COMMENT -> channel(HIDDEN); | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
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.
definitely a bug, but it should not escape into a published artifact or release.