Skip to content

Commit 8b7e234

Browse files
Use LP RP instead
1 parent 996cb45 commit 8b7e234

File tree

7 files changed

+448
-449
lines changed

7 files changed

+448
-449
lines changed

x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ explainCommand
240240
;
241241

242242
subqueryExpression
243-
: OPENING_BRACKET query CLOSING_BRACKET
243+
: LP query RP
244244
;
245245

246246
showCommand

x-pack/plugin/esql/src/main/antlr/lexer/Explain.g4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ lexer grammar Explain;
1111
//
1212
EXPLAIN : 'explain' -> pushMode(EXPLAIN_MODE);
1313

14-
1514
mode EXPLAIN_MODE;
16-
EXPLAIN_OPENING_BRACKET : OPENING_BRACKET -> type(OPENING_BRACKET), pushMode(DEFAULT_MODE);
15+
EXPLAIN_LP : LP -> type(LP), pushMode(DEFAULT_MODE);
1716
EXPLAIN_PIPE : PIPE -> type(PIPE), popMode;
17+
1818
EXPLAIN_WS : WS -> channel(HIDDEN);
1919
EXPLAIN_LINE_COMMENT : LINE_COMMENT -> channel(HIDDEN);
2020
EXPLAIN_MULTILINE_COMMENT : MULTILINE_COMMENT -> channel(HIDDEN);

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.interp

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.java

Lines changed: 433 additions & 434 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/220_explain.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ explainRow:
4444
- "No limit defined, adding default limit of \\[.*\\]"
4545
esql.query:
4646
body:
47-
query: 'EXPLAIN [row a = 1]'
47+
query: 'EXPLAIN (row a = 1)'
4848

4949
- length: { columns: 3 }
5050
- length: { values: 1 }
@@ -63,7 +63,7 @@ explainQuery:
6363
- "No limit defined, adding default limit of \\[.*\\]"
6464
esql.query:
6565
body:
66-
query: 'EXPLAIN [from test | where color == "red" | eval b = 20]'
66+
query: 'EXPLAIN (from test | where color == "red" | eval b = 20)'
6767

6868
- length: { columns: 3 }
6969
- length: { values: 1 }
@@ -82,7 +82,7 @@ explainDownstream:
8282
- "No limit defined, adding default limit of \\[.*\\]"
8383
esql.query:
8484
body:
85-
query: 'EXPLAIN [row a = 1] | eval b = 2'
85+
query: 'EXPLAIN (row a = 1) | eval b = 2'
8686
catch: "bad_request"
8787

8888
- match: { error.type: "verification_exception" }

0 commit comments

Comments
 (0)