From d614e3c347e68100b269fa2d0ceb262208f51a5b Mon Sep 17 00:00:00 2001 From: Lukas Wegmann Date: Mon, 26 Sep 2022 15:29:45 +0200 Subject: [PATCH] ESQL: `explain` command (#249) * explain grammar * correct handling of lexer modes * review comments --- .../src/main/resources/explain.csv-spec | 15 + .../esql/src/main/antlr/EsqlBaseLexer.g4 | 4 + .../esql/src/main/antlr/EsqlBaseLexer.tokens | 176 +++--- .../esql/src/main/antlr/EsqlBaseParser.g4 | 11 +- .../esql/src/main/antlr/EsqlBaseParser.tokens | 175 +++--- .../xpack/esql/parser/EsqlBaseLexer.interp | 12 +- .../xpack/esql/parser/EsqlBaseLexer.java | 408 +++++++------ .../xpack/esql/parser/EsqlBaseParser.interp | 10 +- .../xpack/esql/parser/EsqlBaseParser.java | 570 +++++++++++------- .../parser/EsqlBaseParserBaseListener.java | 24 + .../parser/EsqlBaseParserBaseVisitor.java | 14 + .../esql/parser/EsqlBaseParserListener.java | 20 + .../esql/parser/EsqlBaseParserVisitor.java | 12 + .../xpack/esql/parser/LogicalPlanBuilder.java | 6 + .../xpack/esql/plan/logical/Explain.java | 73 +++ .../xpack/esql/plan/logical/Row.java | 3 +- .../xpack/esql/session/EsqlSession.java | 2 +- .../xpack/esql/session/Executable.java | 2 +- .../esql/parser/StatementParserTests.java | 23 + 19 files changed, 958 insertions(+), 602 deletions(-) create mode 100644 x-pack/plugin/esql/qa/server/src/main/resources/explain.csv-spec create mode 100644 x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Explain.java diff --git a/x-pack/plugin/esql/qa/server/src/main/resources/explain.csv-spec b/x-pack/plugin/esql/qa/server/src/main/resources/explain.csv-spec new file mode 100644 index 0000000000000..c1e888c90cd93 --- /dev/null +++ b/x-pack/plugin/esql/qa/server/src/main/resources/explain.csv-spec @@ -0,0 +1,15 @@ +explainFrom +explain [ from foo ]; + +plan:keyword | type:keyword +"Project[[?*]] +\_UnresolvedRelation[foo]" | PARSED +; + +explainCompositeQuery +explain [ row a = 1 | where a > 0 ]; + +plan:keyword | type:keyword +"Filter[?a > 0[INTEGER]] + \_Row[[1[INTEGER] AS a]]" | PARSED +; diff --git a/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4 b/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4 index 757817fb5c788..a06910920b932 100644 --- a/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4 +++ b/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4 @@ -1,6 +1,7 @@ lexer grammar EsqlBaseLexer; EVAL : 'eval' -> pushMode(EXPRESSION); +EXPLAIN : 'explain' -> pushMode(EXPRESSION); FROM : 'from' -> pushMode(SOURCE_IDENTIFIERS); ROW : 'row' -> pushMode(EXPRESSION); STATS : 'stats' -> pushMode(EXPRESSION); @@ -75,6 +76,8 @@ FALSE : 'false'; FIRST : 'first'; LAST : 'last'; LP : '('; +OPENING_BRACKET : '[' -> pushMode(DEFAULT_MODE); +CLOSING_BRACKET : ']' -> popMode, popMode; // pop twice, once to clear mode of current cmd and once to exit DEFAULT_MODE NOT : 'not'; NULL : 'null'; NULLS : 'nulls'; @@ -120,6 +123,7 @@ EXPR_WS mode SOURCE_IDENTIFIERS; SRC_PIPE : '|' -> type(PIPE), popMode; +SRC_CLOSING_BRACKET : ']' -> popMode, popMode, type(CLOSING_BRACKET); SRC_COMMA : ',' -> type(COMMA); SRC_UNQUOTED_IDENTIFIER diff --git a/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.tokens b/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.tokens index af2ba450797f6..7cfd5c4573741 100644 --- a/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.tokens +++ b/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.tokens @@ -1,87 +1,93 @@ EVAL=1 -FROM=2 -ROW=3 -STATS=4 -WHERE=5 -SORT=6 -LIMIT=7 -UNKNOWN_COMMAND=8 -LINE_COMMENT=9 -MULTILINE_COMMENT=10 -WS=11 -PIPE=12 -STRING=13 -INTEGER_LITERAL=14 -DECIMAL_LITERAL=15 -BY=16 -AND=17 -ASC=18 -ASSIGN=19 -COMMA=20 -DESC=21 -DOT=22 -FALSE=23 -FIRST=24 -LAST=25 -LP=26 -NOT=27 -NULL=28 -NULLS=29 -OR=30 -RP=31 -TRUE=32 -EQ=33 -NEQ=34 -LT=35 -LTE=36 -GT=37 -GTE=38 -PLUS=39 -MINUS=40 -ASTERISK=41 -SLASH=42 -PERCENT=43 -UNQUOTED_IDENTIFIER=44 -QUOTED_IDENTIFIER=45 -EXPR_LINE_COMMENT=46 -EXPR_MULTILINE_COMMENT=47 -EXPR_WS=48 -SRC_UNQUOTED_IDENTIFIER=49 -SRC_QUOTED_IDENTIFIER=50 -SRC_LINE_COMMENT=51 -SRC_MULTILINE_COMMENT=52 -SRC_WS=53 +EXPLAIN=2 +FROM=3 +ROW=4 +STATS=5 +WHERE=6 +SORT=7 +LIMIT=8 +UNKNOWN_COMMAND=9 +LINE_COMMENT=10 +MULTILINE_COMMENT=11 +WS=12 +PIPE=13 +STRING=14 +INTEGER_LITERAL=15 +DECIMAL_LITERAL=16 +BY=17 +AND=18 +ASC=19 +ASSIGN=20 +COMMA=21 +DESC=22 +DOT=23 +FALSE=24 +FIRST=25 +LAST=26 +LP=27 +OPENING_BRACKET=28 +CLOSING_BRACKET=29 +NOT=30 +NULL=31 +NULLS=32 +OR=33 +RP=34 +TRUE=35 +EQ=36 +NEQ=37 +LT=38 +LTE=39 +GT=40 +GTE=41 +PLUS=42 +MINUS=43 +ASTERISK=44 +SLASH=45 +PERCENT=46 +UNQUOTED_IDENTIFIER=47 +QUOTED_IDENTIFIER=48 +EXPR_LINE_COMMENT=49 +EXPR_MULTILINE_COMMENT=50 +EXPR_WS=51 +SRC_UNQUOTED_IDENTIFIER=52 +SRC_QUOTED_IDENTIFIER=53 +SRC_LINE_COMMENT=54 +SRC_MULTILINE_COMMENT=55 +SRC_WS=56 'eval'=1 -'from'=2 -'row'=3 -'stats'=4 -'where'=5 -'sort'=6 -'limit'=7 -'by'=16 -'and'=17 -'asc'=18 -'='=19 -'desc'=21 -'.'=22 -'false'=23 -'first'=24 -'last'=25 -'('=26 -'not'=27 -'null'=28 -'nulls'=29 -'or'=30 -')'=31 -'true'=32 -'=='=33 -'!='=34 -'<'=35 -'<='=36 -'>'=37 -'>='=38 -'+'=39 -'-'=40 -'*'=41 -'/'=42 -'%'=43 +'explain'=2 +'from'=3 +'row'=4 +'stats'=5 +'where'=6 +'sort'=7 +'limit'=8 +'by'=17 +'and'=18 +'asc'=19 +'='=20 +'desc'=22 +'.'=23 +'false'=24 +'first'=25 +'last'=26 +'('=27 +'['=28 +']'=29 +'not'=30 +'null'=31 +'nulls'=32 +'or'=33 +')'=34 +'true'=35 +'=='=36 +'!='=37 +'<'=38 +'<='=39 +'>'=40 +'>='=41 +'+'=42 +'-'=43 +'*'=44 +'/'=45 +'%'=46 diff --git a/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 b/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 index ede11e97b4050..599f83645ec3a 100644 --- a/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 +++ b/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 @@ -20,8 +20,9 @@ query ; sourceCommand - : rowCommand + : explainCommand | fromCommand + | rowCommand ; processingCommand @@ -140,3 +141,11 @@ string comparisonOperator : EQ | NEQ | LT | LTE | GT | GTE ; + +explainCommand + : EXPLAIN subqueryExpression + ; + +subqueryExpression + : OPENING_BRACKET query CLOSING_BRACKET + ; diff --git a/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.tokens b/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.tokens index af2ba450797f6..8e0c3df6989fc 100644 --- a/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.tokens +++ b/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.tokens @@ -1,87 +1,92 @@ EVAL=1 -FROM=2 -ROW=3 -STATS=4 -WHERE=5 -SORT=6 -LIMIT=7 -UNKNOWN_COMMAND=8 -LINE_COMMENT=9 -MULTILINE_COMMENT=10 -WS=11 -PIPE=12 -STRING=13 -INTEGER_LITERAL=14 -DECIMAL_LITERAL=15 -BY=16 -AND=17 -ASC=18 -ASSIGN=19 -COMMA=20 -DESC=21 -DOT=22 -FALSE=23 -FIRST=24 -LAST=25 -LP=26 -NOT=27 -NULL=28 -NULLS=29 -OR=30 -RP=31 -TRUE=32 -EQ=33 -NEQ=34 -LT=35 -LTE=36 -GT=37 -GTE=38 -PLUS=39 -MINUS=40 -ASTERISK=41 -SLASH=42 -PERCENT=43 -UNQUOTED_IDENTIFIER=44 -QUOTED_IDENTIFIER=45 -EXPR_LINE_COMMENT=46 -EXPR_MULTILINE_COMMENT=47 -EXPR_WS=48 -SRC_UNQUOTED_IDENTIFIER=49 -SRC_QUOTED_IDENTIFIER=50 -SRC_LINE_COMMENT=51 -SRC_MULTILINE_COMMENT=52 -SRC_WS=53 +EXPLAIN=2 +FROM=3 +ROW=4 +STATS=5 +WHERE=6 +SORT=7 +LIMIT=8 +UNKNOWN_COMMAND=9 +LINE_COMMENT=10 +MULTILINE_COMMENT=11 +WS=12 +PIPE=13 +STRING=14 +INTEGER_LITERAL=15 +DECIMAL_LITERAL=16 +BY=17 +AND=18 +ASC=19 +ASSIGN=20 +COMMA=21 +DESC=22 +DOT=23 +FALSE=24 +FIRST=25 +LAST=26 +LP=27 +OPENING_BRACKET=28 +CLOSING_BRACKET=29 +NOT=30 +NULL=31 +NULLS=32 +OR=33 +RP=34 +TRUE=35 +EQ=36 +NEQ=37 +LT=38 +LTE=39 +GT=40 +GTE=41 +PLUS=42 +MINUS=43 +ASTERISK=44 +SLASH=45 +PERCENT=46 +UNQUOTED_IDENTIFIER=47 +QUOTED_IDENTIFIER=48 +EXPR_LINE_COMMENT=49 +EXPR_MULTILINE_COMMENT=50 +EXPR_WS=51 +SRC_UNQUOTED_IDENTIFIER=52 +SRC_QUOTED_IDENTIFIER=53 +SRC_LINE_COMMENT=54 +SRC_MULTILINE_COMMENT=55 +SRC_WS=56 'eval'=1 -'from'=2 -'row'=3 -'stats'=4 -'where'=5 -'sort'=6 -'limit'=7 -'by'=16 -'and'=17 -'asc'=18 -'='=19 -'desc'=21 -'.'=22 -'false'=23 -'first'=24 -'last'=25 -'('=26 -'not'=27 -'null'=28 -'nulls'=29 -'or'=30 -')'=31 -'true'=32 -'=='=33 -'!='=34 -'<'=35 -'<='=36 -'>'=37 -'>='=38 -'+'=39 -'-'=40 -'*'=41 -'/'=42 -'%'=43 +'explain'=2 +'from'=3 +'row'=4 +'stats'=5 +'where'=6 +'sort'=7 +'limit'=8 +'by'=17 +'and'=18 +'asc'=19 +'='=20 +'desc'=22 +'.'=23 +'false'=24 +'first'=25 +'last'=26 +'('=27 +'['=28 +'not'=30 +'null'=31 +'nulls'=32 +'or'=33 +')'=34 +'true'=35 +'=='=36 +'!='=37 +'<'=38 +'<='=39 +'>'=40 +'>='=41 +'+'=42 +'-'=43 +'*'=44 +'/'=45 +'%'=46 diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.interp b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.interp index cfc2fca44127e..f10260bfb9765 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.interp +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.interp @@ -1,6 +1,7 @@ token literal names: null 'eval' +'explain' 'from' 'row' 'stats' @@ -26,6 +27,8 @@ null 'first' 'last' '(' +'[' +null 'not' 'null' 'nulls' @@ -57,6 +60,7 @@ null token symbolic names: null EVAL +EXPLAIN FROM ROW STATS @@ -82,6 +86,8 @@ FALSE FIRST LAST LP +OPENING_BRACKET +CLOSING_BRACKET NOT NULL NULLS @@ -112,6 +118,7 @@ SRC_WS rule names: EVAL +EXPLAIN FROM ROW STATS @@ -142,6 +149,8 @@ FALSE FIRST LAST LP +OPENING_BRACKET +CLOSING_BRACKET NOT NULL NULLS @@ -165,6 +174,7 @@ EXPR_LINE_COMMENT EXPR_MULTILINE_COMMENT EXPR_WS SRC_PIPE +SRC_CLOSING_BRACKET SRC_COMMA SRC_UNQUOTED_IDENTIFIER SRC_QUOTED_IDENTIFIER @@ -182,4 +192,4 @@ EXPRESSION SOURCE_IDENTIFIERS atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 55, 479, 8, 1, 8, 1, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 6, 9, 178, 10, 9, 13, 9, 14, 9, 179, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 7, 10, 188, 10, 10, 12, 10, 14, 10, 191, 11, 10, 3, 10, 5, 10, 194, 10, 10, 3, 10, 5, 10, 197, 10, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 7, 11, 206, 10, 11, 12, 11, 14, 11, 209, 11, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 6, 12, 217, 10, 12, 13, 12, 14, 12, 218, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 5, 18, 238, 10, 18, 3, 18, 6, 18, 241, 10, 18, 13, 18, 14, 18, 242, 3, 19, 3, 19, 3, 19, 7, 19, 248, 10, 19, 12, 19, 14, 19, 251, 11, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 7, 19, 259, 10, 19, 12, 19, 14, 19, 262, 11, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 5, 19, 269, 10, 19, 3, 19, 5, 19, 272, 10, 19, 5, 19, 274, 10, 19, 3, 20, 6, 20, 277, 10, 20, 13, 20, 14, 20, 278, 3, 21, 6, 21, 282, 10, 21, 13, 21, 14, 21, 283, 3, 21, 3, 21, 7, 21, 288, 10, 21, 12, 21, 14, 21, 291, 11, 21, 3, 21, 3, 21, 6, 21, 295, 10, 21, 13, 21, 14, 21, 296, 3, 21, 6, 21, 300, 10, 21, 13, 21, 14, 21, 301, 3, 21, 3, 21, 7, 21, 306, 10, 21, 12, 21, 14, 21, 309, 11, 21, 5, 21, 311, 10, 21, 3, 21, 3, 21, 3, 21, 3, 21, 6, 21, 317, 10, 21, 13, 21, 14, 21, 318, 3, 21, 3, 21, 5, 21, 323, 10, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 5, 50, 419, 10, 50, 3, 50, 3, 50, 3, 50, 7, 50, 424, 10, 50, 12, 50, 14, 50, 427, 11, 50, 3, 51, 3, 51, 3, 51, 3, 51, 7, 51, 433, 10, 51, 12, 51, 14, 51, 436, 11, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 6, 57, 462, 10, 57, 13, 57, 14, 57, 463, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 61, 4, 207, 260, 2, 62, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 2, 31, 2, 33, 2, 35, 2, 37, 2, 39, 15, 41, 16, 43, 17, 45, 18, 47, 19, 49, 20, 51, 21, 53, 22, 55, 23, 57, 24, 59, 25, 61, 26, 63, 27, 65, 28, 67, 29, 69, 30, 71, 31, 73, 32, 75, 33, 77, 34, 79, 35, 81, 36, 83, 37, 85, 38, 87, 39, 89, 40, 91, 41, 93, 42, 95, 43, 97, 44, 99, 45, 101, 46, 103, 47, 105, 48, 107, 49, 109, 50, 111, 2, 113, 2, 115, 51, 117, 52, 119, 53, 121, 54, 123, 55, 5, 2, 3, 4, 12, 5, 2, 11, 12, 15, 15, 34, 34, 4, 2, 12, 12, 15, 15, 3, 2, 50, 59, 4, 2, 67, 92, 99, 124, 7, 2, 36, 36, 94, 94, 112, 112, 116, 116, 118, 118, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 3, 2, 98, 98, 9, 2, 11, 12, 15, 15, 34, 34, 46, 46, 48, 48, 98, 98, 126, 126, 2, 504, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 3, 27, 3, 2, 2, 2, 3, 39, 3, 2, 2, 2, 3, 41, 3, 2, 2, 2, 3, 43, 3, 2, 2, 2, 3, 45, 3, 2, 2, 2, 3, 47, 3, 2, 2, 2, 3, 49, 3, 2, 2, 2, 3, 51, 3, 2, 2, 2, 3, 53, 3, 2, 2, 2, 3, 55, 3, 2, 2, 2, 3, 57, 3, 2, 2, 2, 3, 59, 3, 2, 2, 2, 3, 61, 3, 2, 2, 2, 3, 63, 3, 2, 2, 2, 3, 65, 3, 2, 2, 2, 3, 67, 3, 2, 2, 2, 3, 69, 3, 2, 2, 2, 3, 71, 3, 2, 2, 2, 3, 73, 3, 2, 2, 2, 3, 75, 3, 2, 2, 2, 3, 77, 3, 2, 2, 2, 3, 79, 3, 2, 2, 2, 3, 81, 3, 2, 2, 2, 3, 83, 3, 2, 2, 2, 3, 85, 3, 2, 2, 2, 3, 87, 3, 2, 2, 2, 3, 89, 3, 2, 2, 2, 3, 91, 3, 2, 2, 2, 3, 93, 3, 2, 2, 2, 3, 95, 3, 2, 2, 2, 3, 97, 3, 2, 2, 2, 3, 99, 3, 2, 2, 2, 3, 101, 3, 2, 2, 2, 3, 103, 3, 2, 2, 2, 3, 105, 3, 2, 2, 2, 3, 107, 3, 2, 2, 2, 3, 109, 3, 2, 2, 2, 4, 111, 3, 2, 2, 2, 4, 113, 3, 2, 2, 2, 4, 115, 3, 2, 2, 2, 4, 117, 3, 2, 2, 2, 4, 119, 3, 2, 2, 2, 4, 121, 3, 2, 2, 2, 4, 123, 3, 2, 2, 2, 5, 125, 3, 2, 2, 2, 7, 132, 3, 2, 2, 2, 9, 139, 3, 2, 2, 2, 11, 145, 3, 2, 2, 2, 13, 153, 3, 2, 2, 2, 15, 161, 3, 2, 2, 2, 17, 168, 3, 2, 2, 2, 19, 177, 3, 2, 2, 2, 21, 183, 3, 2, 2, 2, 23, 200, 3, 2, 2, 2, 25, 216, 3, 2, 2, 2, 27, 222, 3, 2, 2, 2, 29, 226, 3, 2, 2, 2, 31, 228, 3, 2, 2, 2, 33, 230, 3, 2, 2, 2, 35, 233, 3, 2, 2, 2, 37, 235, 3, 2, 2, 2, 39, 273, 3, 2, 2, 2, 41, 276, 3, 2, 2, 2, 43, 322, 3, 2, 2, 2, 45, 324, 3, 2, 2, 2, 47, 327, 3, 2, 2, 2, 49, 331, 3, 2, 2, 2, 51, 335, 3, 2, 2, 2, 53, 337, 3, 2, 2, 2, 55, 339, 3, 2, 2, 2, 57, 344, 3, 2, 2, 2, 59, 346, 3, 2, 2, 2, 61, 352, 3, 2, 2, 2, 63, 358, 3, 2, 2, 2, 65, 363, 3, 2, 2, 2, 67, 365, 3, 2, 2, 2, 69, 369, 3, 2, 2, 2, 71, 374, 3, 2, 2, 2, 73, 380, 3, 2, 2, 2, 75, 383, 3, 2, 2, 2, 77, 385, 3, 2, 2, 2, 79, 390, 3, 2, 2, 2, 81, 393, 3, 2, 2, 2, 83, 396, 3, 2, 2, 2, 85, 398, 3, 2, 2, 2, 87, 401, 3, 2, 2, 2, 89, 403, 3, 2, 2, 2, 91, 406, 3, 2, 2, 2, 93, 408, 3, 2, 2, 2, 95, 410, 3, 2, 2, 2, 97, 412, 3, 2, 2, 2, 99, 414, 3, 2, 2, 2, 101, 418, 3, 2, 2, 2, 103, 428, 3, 2, 2, 2, 105, 439, 3, 2, 2, 2, 107, 443, 3, 2, 2, 2, 109, 447, 3, 2, 2, 2, 111, 451, 3, 2, 2, 2, 113, 456, 3, 2, 2, 2, 115, 461, 3, 2, 2, 2, 117, 465, 3, 2, 2, 2, 119, 467, 3, 2, 2, 2, 121, 471, 3, 2, 2, 2, 123, 475, 3, 2, 2, 2, 125, 126, 7, 103, 2, 2, 126, 127, 7, 120, 2, 2, 127, 128, 7, 99, 2, 2, 128, 129, 7, 110, 2, 2, 129, 130, 3, 2, 2, 2, 130, 131, 8, 2, 2, 2, 131, 6, 3, 2, 2, 2, 132, 133, 7, 104, 2, 2, 133, 134, 7, 116, 2, 2, 134, 135, 7, 113, 2, 2, 135, 136, 7, 111, 2, 2, 136, 137, 3, 2, 2, 2, 137, 138, 8, 3, 3, 2, 138, 8, 3, 2, 2, 2, 139, 140, 7, 116, 2, 2, 140, 141, 7, 113, 2, 2, 141, 142, 7, 121, 2, 2, 142, 143, 3, 2, 2, 2, 143, 144, 8, 4, 2, 2, 144, 10, 3, 2, 2, 2, 145, 146, 7, 117, 2, 2, 146, 147, 7, 118, 2, 2, 147, 148, 7, 99, 2, 2, 148, 149, 7, 118, 2, 2, 149, 150, 7, 117, 2, 2, 150, 151, 3, 2, 2, 2, 151, 152, 8, 5, 2, 2, 152, 12, 3, 2, 2, 2, 153, 154, 7, 121, 2, 2, 154, 155, 7, 106, 2, 2, 155, 156, 7, 103, 2, 2, 156, 157, 7, 116, 2, 2, 157, 158, 7, 103, 2, 2, 158, 159, 3, 2, 2, 2, 159, 160, 8, 6, 2, 2, 160, 14, 3, 2, 2, 2, 161, 162, 7, 117, 2, 2, 162, 163, 7, 113, 2, 2, 163, 164, 7, 116, 2, 2, 164, 165, 7, 118, 2, 2, 165, 166, 3, 2, 2, 2, 166, 167, 8, 7, 2, 2, 167, 16, 3, 2, 2, 2, 168, 169, 7, 110, 2, 2, 169, 170, 7, 107, 2, 2, 170, 171, 7, 111, 2, 2, 171, 172, 7, 107, 2, 2, 172, 173, 7, 118, 2, 2, 173, 174, 3, 2, 2, 2, 174, 175, 8, 8, 2, 2, 175, 18, 3, 2, 2, 2, 176, 178, 10, 2, 2, 2, 177, 176, 3, 2, 2, 2, 178, 179, 3, 2, 2, 2, 179, 177, 3, 2, 2, 2, 179, 180, 3, 2, 2, 2, 180, 181, 3, 2, 2, 2, 181, 182, 8, 9, 2, 2, 182, 20, 3, 2, 2, 2, 183, 184, 7, 49, 2, 2, 184, 185, 7, 49, 2, 2, 185, 189, 3, 2, 2, 2, 186, 188, 10, 3, 2, 2, 187, 186, 3, 2, 2, 2, 188, 191, 3, 2, 2, 2, 189, 187, 3, 2, 2, 2, 189, 190, 3, 2, 2, 2, 190, 193, 3, 2, 2, 2, 191, 189, 3, 2, 2, 2, 192, 194, 7, 15, 2, 2, 193, 192, 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 196, 3, 2, 2, 2, 195, 197, 7, 12, 2, 2, 196, 195, 3, 2, 2, 2, 196, 197, 3, 2, 2, 2, 197, 198, 3, 2, 2, 2, 198, 199, 8, 10, 4, 2, 199, 22, 3, 2, 2, 2, 200, 201, 7, 49, 2, 2, 201, 202, 7, 44, 2, 2, 202, 207, 3, 2, 2, 2, 203, 206, 5, 23, 11, 2, 204, 206, 11, 2, 2, 2, 205, 203, 3, 2, 2, 2, 205, 204, 3, 2, 2, 2, 206, 209, 3, 2, 2, 2, 207, 208, 3, 2, 2, 2, 207, 205, 3, 2, 2, 2, 208, 210, 3, 2, 2, 2, 209, 207, 3, 2, 2, 2, 210, 211, 7, 44, 2, 2, 211, 212, 7, 49, 2, 2, 212, 213, 3, 2, 2, 2, 213, 214, 8, 11, 4, 2, 214, 24, 3, 2, 2, 2, 215, 217, 9, 2, 2, 2, 216, 215, 3, 2, 2, 2, 217, 218, 3, 2, 2, 2, 218, 216, 3, 2, 2, 2, 218, 219, 3, 2, 2, 2, 219, 220, 3, 2, 2, 2, 220, 221, 8, 12, 4, 2, 221, 26, 3, 2, 2, 2, 222, 223, 7, 126, 2, 2, 223, 224, 3, 2, 2, 2, 224, 225, 8, 13, 5, 2, 225, 28, 3, 2, 2, 2, 226, 227, 9, 4, 2, 2, 227, 30, 3, 2, 2, 2, 228, 229, 9, 5, 2, 2, 229, 32, 3, 2, 2, 2, 230, 231, 7, 94, 2, 2, 231, 232, 9, 6, 2, 2, 232, 34, 3, 2, 2, 2, 233, 234, 10, 7, 2, 2, 234, 36, 3, 2, 2, 2, 235, 237, 9, 8, 2, 2, 236, 238, 9, 9, 2, 2, 237, 236, 3, 2, 2, 2, 237, 238, 3, 2, 2, 2, 238, 240, 3, 2, 2, 2, 239, 241, 5, 29, 14, 2, 240, 239, 3, 2, 2, 2, 241, 242, 3, 2, 2, 2, 242, 240, 3, 2, 2, 2, 242, 243, 3, 2, 2, 2, 243, 38, 3, 2, 2, 2, 244, 249, 7, 36, 2, 2, 245, 248, 5, 33, 16, 2, 246, 248, 5, 35, 17, 2, 247, 245, 3, 2, 2, 2, 247, 246, 3, 2, 2, 2, 248, 251, 3, 2, 2, 2, 249, 247, 3, 2, 2, 2, 249, 250, 3, 2, 2, 2, 250, 252, 3, 2, 2, 2, 251, 249, 3, 2, 2, 2, 252, 274, 7, 36, 2, 2, 253, 254, 7, 36, 2, 2, 254, 255, 7, 36, 2, 2, 255, 256, 7, 36, 2, 2, 256, 260, 3, 2, 2, 2, 257, 259, 10, 3, 2, 2, 258, 257, 3, 2, 2, 2, 259, 262, 3, 2, 2, 2, 260, 261, 3, 2, 2, 2, 260, 258, 3, 2, 2, 2, 261, 263, 3, 2, 2, 2, 262, 260, 3, 2, 2, 2, 263, 264, 7, 36, 2, 2, 264, 265, 7, 36, 2, 2, 265, 266, 7, 36, 2, 2, 266, 268, 3, 2, 2, 2, 267, 269, 7, 36, 2, 2, 268, 267, 3, 2, 2, 2, 268, 269, 3, 2, 2, 2, 269, 271, 3, 2, 2, 2, 270, 272, 7, 36, 2, 2, 271, 270, 3, 2, 2, 2, 271, 272, 3, 2, 2, 2, 272, 274, 3, 2, 2, 2, 273, 244, 3, 2, 2, 2, 273, 253, 3, 2, 2, 2, 274, 40, 3, 2, 2, 2, 275, 277, 5, 29, 14, 2, 276, 275, 3, 2, 2, 2, 277, 278, 3, 2, 2, 2, 278, 276, 3, 2, 2, 2, 278, 279, 3, 2, 2, 2, 279, 42, 3, 2, 2, 2, 280, 282, 5, 29, 14, 2, 281, 280, 3, 2, 2, 2, 282, 283, 3, 2, 2, 2, 283, 281, 3, 2, 2, 2, 283, 284, 3, 2, 2, 2, 284, 285, 3, 2, 2, 2, 285, 289, 5, 57, 28, 2, 286, 288, 5, 29, 14, 2, 287, 286, 3, 2, 2, 2, 288, 291, 3, 2, 2, 2, 289, 287, 3, 2, 2, 2, 289, 290, 3, 2, 2, 2, 290, 323, 3, 2, 2, 2, 291, 289, 3, 2, 2, 2, 292, 294, 5, 57, 28, 2, 293, 295, 5, 29, 14, 2, 294, 293, 3, 2, 2, 2, 295, 296, 3, 2, 2, 2, 296, 294, 3, 2, 2, 2, 296, 297, 3, 2, 2, 2, 297, 323, 3, 2, 2, 2, 298, 300, 5, 29, 14, 2, 299, 298, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 299, 3, 2, 2, 2, 301, 302, 3, 2, 2, 2, 302, 310, 3, 2, 2, 2, 303, 307, 5, 57, 28, 2, 304, 306, 5, 29, 14, 2, 305, 304, 3, 2, 2, 2, 306, 309, 3, 2, 2, 2, 307, 305, 3, 2, 2, 2, 307, 308, 3, 2, 2, 2, 308, 311, 3, 2, 2, 2, 309, 307, 3, 2, 2, 2, 310, 303, 3, 2, 2, 2, 310, 311, 3, 2, 2, 2, 311, 312, 3, 2, 2, 2, 312, 313, 5, 37, 18, 2, 313, 323, 3, 2, 2, 2, 314, 316, 5, 57, 28, 2, 315, 317, 5, 29, 14, 2, 316, 315, 3, 2, 2, 2, 317, 318, 3, 2, 2, 2, 318, 316, 3, 2, 2, 2, 318, 319, 3, 2, 2, 2, 319, 320, 3, 2, 2, 2, 320, 321, 5, 37, 18, 2, 321, 323, 3, 2, 2, 2, 322, 281, 3, 2, 2, 2, 322, 292, 3, 2, 2, 2, 322, 299, 3, 2, 2, 2, 322, 314, 3, 2, 2, 2, 323, 44, 3, 2, 2, 2, 324, 325, 7, 100, 2, 2, 325, 326, 7, 123, 2, 2, 326, 46, 3, 2, 2, 2, 327, 328, 7, 99, 2, 2, 328, 329, 7, 112, 2, 2, 329, 330, 7, 102, 2, 2, 330, 48, 3, 2, 2, 2, 331, 332, 7, 99, 2, 2, 332, 333, 7, 117, 2, 2, 333, 334, 7, 101, 2, 2, 334, 50, 3, 2, 2, 2, 335, 336, 7, 63, 2, 2, 336, 52, 3, 2, 2, 2, 337, 338, 7, 46, 2, 2, 338, 54, 3, 2, 2, 2, 339, 340, 7, 102, 2, 2, 340, 341, 7, 103, 2, 2, 341, 342, 7, 117, 2, 2, 342, 343, 7, 101, 2, 2, 343, 56, 3, 2, 2, 2, 344, 345, 7, 48, 2, 2, 345, 58, 3, 2, 2, 2, 346, 347, 7, 104, 2, 2, 347, 348, 7, 99, 2, 2, 348, 349, 7, 110, 2, 2, 349, 350, 7, 117, 2, 2, 350, 351, 7, 103, 2, 2, 351, 60, 3, 2, 2, 2, 352, 353, 7, 104, 2, 2, 353, 354, 7, 107, 2, 2, 354, 355, 7, 116, 2, 2, 355, 356, 7, 117, 2, 2, 356, 357, 7, 118, 2, 2, 357, 62, 3, 2, 2, 2, 358, 359, 7, 110, 2, 2, 359, 360, 7, 99, 2, 2, 360, 361, 7, 117, 2, 2, 361, 362, 7, 118, 2, 2, 362, 64, 3, 2, 2, 2, 363, 364, 7, 42, 2, 2, 364, 66, 3, 2, 2, 2, 365, 366, 7, 112, 2, 2, 366, 367, 7, 113, 2, 2, 367, 368, 7, 118, 2, 2, 368, 68, 3, 2, 2, 2, 369, 370, 7, 112, 2, 2, 370, 371, 7, 119, 2, 2, 371, 372, 7, 110, 2, 2, 372, 373, 7, 110, 2, 2, 373, 70, 3, 2, 2, 2, 374, 375, 7, 112, 2, 2, 375, 376, 7, 119, 2, 2, 376, 377, 7, 110, 2, 2, 377, 378, 7, 110, 2, 2, 378, 379, 7, 117, 2, 2, 379, 72, 3, 2, 2, 2, 380, 381, 7, 113, 2, 2, 381, 382, 7, 116, 2, 2, 382, 74, 3, 2, 2, 2, 383, 384, 7, 43, 2, 2, 384, 76, 3, 2, 2, 2, 385, 386, 7, 118, 2, 2, 386, 387, 7, 116, 2, 2, 387, 388, 7, 119, 2, 2, 388, 389, 7, 103, 2, 2, 389, 78, 3, 2, 2, 2, 390, 391, 7, 63, 2, 2, 391, 392, 7, 63, 2, 2, 392, 80, 3, 2, 2, 2, 393, 394, 7, 35, 2, 2, 394, 395, 7, 63, 2, 2, 395, 82, 3, 2, 2, 2, 396, 397, 7, 62, 2, 2, 397, 84, 3, 2, 2, 2, 398, 399, 7, 62, 2, 2, 399, 400, 7, 63, 2, 2, 400, 86, 3, 2, 2, 2, 401, 402, 7, 64, 2, 2, 402, 88, 3, 2, 2, 2, 403, 404, 7, 64, 2, 2, 404, 405, 7, 63, 2, 2, 405, 90, 3, 2, 2, 2, 406, 407, 7, 45, 2, 2, 407, 92, 3, 2, 2, 2, 408, 409, 7, 47, 2, 2, 409, 94, 3, 2, 2, 2, 410, 411, 7, 44, 2, 2, 411, 96, 3, 2, 2, 2, 412, 413, 7, 49, 2, 2, 413, 98, 3, 2, 2, 2, 414, 415, 7, 39, 2, 2, 415, 100, 3, 2, 2, 2, 416, 419, 5, 31, 15, 2, 417, 419, 7, 97, 2, 2, 418, 416, 3, 2, 2, 2, 418, 417, 3, 2, 2, 2, 419, 425, 3, 2, 2, 2, 420, 424, 5, 31, 15, 2, 421, 424, 5, 29, 14, 2, 422, 424, 7, 97, 2, 2, 423, 420, 3, 2, 2, 2, 423, 421, 3, 2, 2, 2, 423, 422, 3, 2, 2, 2, 424, 427, 3, 2, 2, 2, 425, 423, 3, 2, 2, 2, 425, 426, 3, 2, 2, 2, 426, 102, 3, 2, 2, 2, 427, 425, 3, 2, 2, 2, 428, 434, 7, 98, 2, 2, 429, 433, 10, 10, 2, 2, 430, 431, 7, 98, 2, 2, 431, 433, 7, 98, 2, 2, 432, 429, 3, 2, 2, 2, 432, 430, 3, 2, 2, 2, 433, 436, 3, 2, 2, 2, 434, 432, 3, 2, 2, 2, 434, 435, 3, 2, 2, 2, 435, 437, 3, 2, 2, 2, 436, 434, 3, 2, 2, 2, 437, 438, 7, 98, 2, 2, 438, 104, 3, 2, 2, 2, 439, 440, 5, 21, 10, 2, 440, 441, 3, 2, 2, 2, 441, 442, 8, 52, 4, 2, 442, 106, 3, 2, 2, 2, 443, 444, 5, 23, 11, 2, 444, 445, 3, 2, 2, 2, 445, 446, 8, 53, 4, 2, 446, 108, 3, 2, 2, 2, 447, 448, 5, 25, 12, 2, 448, 449, 3, 2, 2, 2, 449, 450, 8, 54, 4, 2, 450, 110, 3, 2, 2, 2, 451, 452, 7, 126, 2, 2, 452, 453, 3, 2, 2, 2, 453, 454, 8, 55, 6, 2, 454, 455, 8, 55, 5, 2, 455, 112, 3, 2, 2, 2, 456, 457, 7, 46, 2, 2, 457, 458, 3, 2, 2, 2, 458, 459, 8, 56, 7, 2, 459, 114, 3, 2, 2, 2, 460, 462, 10, 11, 2, 2, 461, 460, 3, 2, 2, 2, 462, 463, 3, 2, 2, 2, 463, 461, 3, 2, 2, 2, 463, 464, 3, 2, 2, 2, 464, 116, 3, 2, 2, 2, 465, 466, 5, 103, 51, 2, 466, 118, 3, 2, 2, 2, 467, 468, 5, 21, 10, 2, 468, 469, 3, 2, 2, 2, 469, 470, 8, 59, 4, 2, 470, 120, 3, 2, 2, 2, 471, 472, 5, 23, 11, 2, 472, 473, 3, 2, 2, 2, 473, 474, 8, 60, 4, 2, 474, 122, 3, 2, 2, 2, 475, 476, 5, 25, 12, 2, 476, 477, 3, 2, 2, 2, 477, 478, 8, 61, 4, 2, 478, 124, 3, 2, 2, 2, 35, 2, 3, 4, 179, 189, 193, 196, 205, 207, 218, 237, 242, 247, 249, 260, 268, 271, 273, 278, 283, 289, 296, 301, 307, 310, 318, 322, 418, 423, 425, 432, 434, 463, 8, 7, 3, 2, 7, 4, 2, 2, 3, 2, 6, 2, 2, 9, 14, 2, 9, 22, 2] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 58, 507, 8, 1, 8, 1, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 6, 10, 196, 10, 10, 13, 10, 14, 10, 197, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 7, 11, 206, 10, 11, 12, 11, 14, 11, 209, 11, 11, 3, 11, 5, 11, 212, 10, 11, 3, 11, 5, 11, 215, 10, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 7, 12, 224, 10, 12, 12, 12, 14, 12, 227, 11, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 6, 13, 235, 10, 13, 13, 13, 14, 13, 236, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 5, 19, 256, 10, 19, 3, 19, 6, 19, 259, 10, 19, 13, 19, 14, 19, 260, 3, 20, 3, 20, 3, 20, 7, 20, 266, 10, 20, 12, 20, 14, 20, 269, 11, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 277, 10, 20, 12, 20, 14, 20, 280, 11, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 5, 20, 287, 10, 20, 3, 20, 5, 20, 290, 10, 20, 5, 20, 292, 10, 20, 3, 21, 6, 21, 295, 10, 21, 13, 21, 14, 21, 296, 3, 22, 6, 22, 300, 10, 22, 13, 22, 14, 22, 301, 3, 22, 3, 22, 7, 22, 306, 10, 22, 12, 22, 14, 22, 309, 11, 22, 3, 22, 3, 22, 6, 22, 313, 10, 22, 13, 22, 14, 22, 314, 3, 22, 6, 22, 318, 10, 22, 13, 22, 14, 22, 319, 3, 22, 3, 22, 7, 22, 324, 10, 22, 12, 22, 14, 22, 327, 11, 22, 5, 22, 329, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 6, 22, 335, 10, 22, 13, 22, 14, 22, 336, 3, 22, 3, 22, 5, 22, 341, 10, 22, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 51, 3, 51, 3, 52, 3, 52, 3, 53, 3, 53, 5, 53, 443, 10, 53, 3, 53, 3, 53, 3, 53, 7, 53, 448, 10, 53, 12, 53, 14, 53, 451, 11, 53, 3, 54, 3, 54, 3, 54, 3, 54, 7, 54, 457, 10, 54, 12, 54, 14, 54, 460, 11, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 60, 3, 61, 6, 61, 490, 10, 61, 13, 61, 14, 61, 491, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 65, 4, 225, 278, 2, 66, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 2, 33, 2, 35, 2, 37, 2, 39, 2, 41, 16, 43, 17, 45, 18, 47, 19, 49, 20, 51, 21, 53, 22, 55, 23, 57, 24, 59, 25, 61, 26, 63, 27, 65, 28, 67, 29, 69, 30, 71, 31, 73, 32, 75, 33, 77, 34, 79, 35, 81, 36, 83, 37, 85, 38, 87, 39, 89, 40, 91, 41, 93, 42, 95, 43, 97, 44, 99, 45, 101, 46, 103, 47, 105, 48, 107, 49, 109, 50, 111, 51, 113, 52, 115, 53, 117, 2, 119, 2, 121, 2, 123, 54, 125, 55, 127, 56, 129, 57, 131, 58, 5, 2, 3, 4, 12, 5, 2, 11, 12, 15, 15, 34, 34, 4, 2, 12, 12, 15, 15, 3, 2, 50, 59, 4, 2, 67, 92, 99, 124, 7, 2, 36, 36, 94, 94, 112, 112, 116, 116, 118, 118, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 3, 2, 98, 98, 9, 2, 11, 12, 15, 15, 34, 34, 46, 46, 48, 48, 98, 98, 126, 126, 2, 532, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 3, 29, 3, 2, 2, 2, 3, 41, 3, 2, 2, 2, 3, 43, 3, 2, 2, 2, 3, 45, 3, 2, 2, 2, 3, 47, 3, 2, 2, 2, 3, 49, 3, 2, 2, 2, 3, 51, 3, 2, 2, 2, 3, 53, 3, 2, 2, 2, 3, 55, 3, 2, 2, 2, 3, 57, 3, 2, 2, 2, 3, 59, 3, 2, 2, 2, 3, 61, 3, 2, 2, 2, 3, 63, 3, 2, 2, 2, 3, 65, 3, 2, 2, 2, 3, 67, 3, 2, 2, 2, 3, 69, 3, 2, 2, 2, 3, 71, 3, 2, 2, 2, 3, 73, 3, 2, 2, 2, 3, 75, 3, 2, 2, 2, 3, 77, 3, 2, 2, 2, 3, 79, 3, 2, 2, 2, 3, 81, 3, 2, 2, 2, 3, 83, 3, 2, 2, 2, 3, 85, 3, 2, 2, 2, 3, 87, 3, 2, 2, 2, 3, 89, 3, 2, 2, 2, 3, 91, 3, 2, 2, 2, 3, 93, 3, 2, 2, 2, 3, 95, 3, 2, 2, 2, 3, 97, 3, 2, 2, 2, 3, 99, 3, 2, 2, 2, 3, 101, 3, 2, 2, 2, 3, 103, 3, 2, 2, 2, 3, 105, 3, 2, 2, 2, 3, 107, 3, 2, 2, 2, 3, 109, 3, 2, 2, 2, 3, 111, 3, 2, 2, 2, 3, 113, 3, 2, 2, 2, 3, 115, 3, 2, 2, 2, 4, 117, 3, 2, 2, 2, 4, 119, 3, 2, 2, 2, 4, 121, 3, 2, 2, 2, 4, 123, 3, 2, 2, 2, 4, 125, 3, 2, 2, 2, 4, 127, 3, 2, 2, 2, 4, 129, 3, 2, 2, 2, 4, 131, 3, 2, 2, 2, 5, 133, 3, 2, 2, 2, 7, 140, 3, 2, 2, 2, 9, 150, 3, 2, 2, 2, 11, 157, 3, 2, 2, 2, 13, 163, 3, 2, 2, 2, 15, 171, 3, 2, 2, 2, 17, 179, 3, 2, 2, 2, 19, 186, 3, 2, 2, 2, 21, 195, 3, 2, 2, 2, 23, 201, 3, 2, 2, 2, 25, 218, 3, 2, 2, 2, 27, 234, 3, 2, 2, 2, 29, 240, 3, 2, 2, 2, 31, 244, 3, 2, 2, 2, 33, 246, 3, 2, 2, 2, 35, 248, 3, 2, 2, 2, 37, 251, 3, 2, 2, 2, 39, 253, 3, 2, 2, 2, 41, 291, 3, 2, 2, 2, 43, 294, 3, 2, 2, 2, 45, 340, 3, 2, 2, 2, 47, 342, 3, 2, 2, 2, 49, 345, 3, 2, 2, 2, 51, 349, 3, 2, 2, 2, 53, 353, 3, 2, 2, 2, 55, 355, 3, 2, 2, 2, 57, 357, 3, 2, 2, 2, 59, 362, 3, 2, 2, 2, 61, 364, 3, 2, 2, 2, 63, 370, 3, 2, 2, 2, 65, 376, 3, 2, 2, 2, 67, 381, 3, 2, 2, 2, 69, 383, 3, 2, 2, 2, 71, 387, 3, 2, 2, 2, 73, 389, 3, 2, 2, 2, 75, 393, 3, 2, 2, 2, 77, 398, 3, 2, 2, 2, 79, 404, 3, 2, 2, 2, 81, 407, 3, 2, 2, 2, 83, 409, 3, 2, 2, 2, 85, 414, 3, 2, 2, 2, 87, 417, 3, 2, 2, 2, 89, 420, 3, 2, 2, 2, 91, 422, 3, 2, 2, 2, 93, 425, 3, 2, 2, 2, 95, 427, 3, 2, 2, 2, 97, 430, 3, 2, 2, 2, 99, 432, 3, 2, 2, 2, 101, 434, 3, 2, 2, 2, 103, 436, 3, 2, 2, 2, 105, 438, 3, 2, 2, 2, 107, 442, 3, 2, 2, 2, 109, 452, 3, 2, 2, 2, 111, 463, 3, 2, 2, 2, 113, 467, 3, 2, 2, 2, 115, 471, 3, 2, 2, 2, 117, 475, 3, 2, 2, 2, 119, 480, 3, 2, 2, 2, 121, 484, 3, 2, 2, 2, 123, 489, 3, 2, 2, 2, 125, 493, 3, 2, 2, 2, 127, 495, 3, 2, 2, 2, 129, 499, 3, 2, 2, 2, 131, 503, 3, 2, 2, 2, 133, 134, 7, 103, 2, 2, 134, 135, 7, 120, 2, 2, 135, 136, 7, 99, 2, 2, 136, 137, 7, 110, 2, 2, 137, 138, 3, 2, 2, 2, 138, 139, 8, 2, 2, 2, 139, 6, 3, 2, 2, 2, 140, 141, 7, 103, 2, 2, 141, 142, 7, 122, 2, 2, 142, 143, 7, 114, 2, 2, 143, 144, 7, 110, 2, 2, 144, 145, 7, 99, 2, 2, 145, 146, 7, 107, 2, 2, 146, 147, 7, 112, 2, 2, 147, 148, 3, 2, 2, 2, 148, 149, 8, 3, 2, 2, 149, 8, 3, 2, 2, 2, 150, 151, 7, 104, 2, 2, 151, 152, 7, 116, 2, 2, 152, 153, 7, 113, 2, 2, 153, 154, 7, 111, 2, 2, 154, 155, 3, 2, 2, 2, 155, 156, 8, 4, 3, 2, 156, 10, 3, 2, 2, 2, 157, 158, 7, 116, 2, 2, 158, 159, 7, 113, 2, 2, 159, 160, 7, 121, 2, 2, 160, 161, 3, 2, 2, 2, 161, 162, 8, 5, 2, 2, 162, 12, 3, 2, 2, 2, 163, 164, 7, 117, 2, 2, 164, 165, 7, 118, 2, 2, 165, 166, 7, 99, 2, 2, 166, 167, 7, 118, 2, 2, 167, 168, 7, 117, 2, 2, 168, 169, 3, 2, 2, 2, 169, 170, 8, 6, 2, 2, 170, 14, 3, 2, 2, 2, 171, 172, 7, 121, 2, 2, 172, 173, 7, 106, 2, 2, 173, 174, 7, 103, 2, 2, 174, 175, 7, 116, 2, 2, 175, 176, 7, 103, 2, 2, 176, 177, 3, 2, 2, 2, 177, 178, 8, 7, 2, 2, 178, 16, 3, 2, 2, 2, 179, 180, 7, 117, 2, 2, 180, 181, 7, 113, 2, 2, 181, 182, 7, 116, 2, 2, 182, 183, 7, 118, 2, 2, 183, 184, 3, 2, 2, 2, 184, 185, 8, 8, 2, 2, 185, 18, 3, 2, 2, 2, 186, 187, 7, 110, 2, 2, 187, 188, 7, 107, 2, 2, 188, 189, 7, 111, 2, 2, 189, 190, 7, 107, 2, 2, 190, 191, 7, 118, 2, 2, 191, 192, 3, 2, 2, 2, 192, 193, 8, 9, 2, 2, 193, 20, 3, 2, 2, 2, 194, 196, 10, 2, 2, 2, 195, 194, 3, 2, 2, 2, 196, 197, 3, 2, 2, 2, 197, 195, 3, 2, 2, 2, 197, 198, 3, 2, 2, 2, 198, 199, 3, 2, 2, 2, 199, 200, 8, 10, 2, 2, 200, 22, 3, 2, 2, 2, 201, 202, 7, 49, 2, 2, 202, 203, 7, 49, 2, 2, 203, 207, 3, 2, 2, 2, 204, 206, 10, 3, 2, 2, 205, 204, 3, 2, 2, 2, 206, 209, 3, 2, 2, 2, 207, 205, 3, 2, 2, 2, 207, 208, 3, 2, 2, 2, 208, 211, 3, 2, 2, 2, 209, 207, 3, 2, 2, 2, 210, 212, 7, 15, 2, 2, 211, 210, 3, 2, 2, 2, 211, 212, 3, 2, 2, 2, 212, 214, 3, 2, 2, 2, 213, 215, 7, 12, 2, 2, 214, 213, 3, 2, 2, 2, 214, 215, 3, 2, 2, 2, 215, 216, 3, 2, 2, 2, 216, 217, 8, 11, 4, 2, 217, 24, 3, 2, 2, 2, 218, 219, 7, 49, 2, 2, 219, 220, 7, 44, 2, 2, 220, 225, 3, 2, 2, 2, 221, 224, 5, 25, 12, 2, 222, 224, 11, 2, 2, 2, 223, 221, 3, 2, 2, 2, 223, 222, 3, 2, 2, 2, 224, 227, 3, 2, 2, 2, 225, 226, 3, 2, 2, 2, 225, 223, 3, 2, 2, 2, 226, 228, 3, 2, 2, 2, 227, 225, 3, 2, 2, 2, 228, 229, 7, 44, 2, 2, 229, 230, 7, 49, 2, 2, 230, 231, 3, 2, 2, 2, 231, 232, 8, 12, 4, 2, 232, 26, 3, 2, 2, 2, 233, 235, 9, 2, 2, 2, 234, 233, 3, 2, 2, 2, 235, 236, 3, 2, 2, 2, 236, 234, 3, 2, 2, 2, 236, 237, 3, 2, 2, 2, 237, 238, 3, 2, 2, 2, 238, 239, 8, 13, 4, 2, 239, 28, 3, 2, 2, 2, 240, 241, 7, 126, 2, 2, 241, 242, 3, 2, 2, 2, 242, 243, 8, 14, 5, 2, 243, 30, 3, 2, 2, 2, 244, 245, 9, 4, 2, 2, 245, 32, 3, 2, 2, 2, 246, 247, 9, 5, 2, 2, 247, 34, 3, 2, 2, 2, 248, 249, 7, 94, 2, 2, 249, 250, 9, 6, 2, 2, 250, 36, 3, 2, 2, 2, 251, 252, 10, 7, 2, 2, 252, 38, 3, 2, 2, 2, 253, 255, 9, 8, 2, 2, 254, 256, 9, 9, 2, 2, 255, 254, 3, 2, 2, 2, 255, 256, 3, 2, 2, 2, 256, 258, 3, 2, 2, 2, 257, 259, 5, 31, 15, 2, 258, 257, 3, 2, 2, 2, 259, 260, 3, 2, 2, 2, 260, 258, 3, 2, 2, 2, 260, 261, 3, 2, 2, 2, 261, 40, 3, 2, 2, 2, 262, 267, 7, 36, 2, 2, 263, 266, 5, 35, 17, 2, 264, 266, 5, 37, 18, 2, 265, 263, 3, 2, 2, 2, 265, 264, 3, 2, 2, 2, 266, 269, 3, 2, 2, 2, 267, 265, 3, 2, 2, 2, 267, 268, 3, 2, 2, 2, 268, 270, 3, 2, 2, 2, 269, 267, 3, 2, 2, 2, 270, 292, 7, 36, 2, 2, 271, 272, 7, 36, 2, 2, 272, 273, 7, 36, 2, 2, 273, 274, 7, 36, 2, 2, 274, 278, 3, 2, 2, 2, 275, 277, 10, 3, 2, 2, 276, 275, 3, 2, 2, 2, 277, 280, 3, 2, 2, 2, 278, 279, 3, 2, 2, 2, 278, 276, 3, 2, 2, 2, 279, 281, 3, 2, 2, 2, 280, 278, 3, 2, 2, 2, 281, 282, 7, 36, 2, 2, 282, 283, 7, 36, 2, 2, 283, 284, 7, 36, 2, 2, 284, 286, 3, 2, 2, 2, 285, 287, 7, 36, 2, 2, 286, 285, 3, 2, 2, 2, 286, 287, 3, 2, 2, 2, 287, 289, 3, 2, 2, 2, 288, 290, 7, 36, 2, 2, 289, 288, 3, 2, 2, 2, 289, 290, 3, 2, 2, 2, 290, 292, 3, 2, 2, 2, 291, 262, 3, 2, 2, 2, 291, 271, 3, 2, 2, 2, 292, 42, 3, 2, 2, 2, 293, 295, 5, 31, 15, 2, 294, 293, 3, 2, 2, 2, 295, 296, 3, 2, 2, 2, 296, 294, 3, 2, 2, 2, 296, 297, 3, 2, 2, 2, 297, 44, 3, 2, 2, 2, 298, 300, 5, 31, 15, 2, 299, 298, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 299, 3, 2, 2, 2, 301, 302, 3, 2, 2, 2, 302, 303, 3, 2, 2, 2, 303, 307, 5, 59, 29, 2, 304, 306, 5, 31, 15, 2, 305, 304, 3, 2, 2, 2, 306, 309, 3, 2, 2, 2, 307, 305, 3, 2, 2, 2, 307, 308, 3, 2, 2, 2, 308, 341, 3, 2, 2, 2, 309, 307, 3, 2, 2, 2, 310, 312, 5, 59, 29, 2, 311, 313, 5, 31, 15, 2, 312, 311, 3, 2, 2, 2, 313, 314, 3, 2, 2, 2, 314, 312, 3, 2, 2, 2, 314, 315, 3, 2, 2, 2, 315, 341, 3, 2, 2, 2, 316, 318, 5, 31, 15, 2, 317, 316, 3, 2, 2, 2, 318, 319, 3, 2, 2, 2, 319, 317, 3, 2, 2, 2, 319, 320, 3, 2, 2, 2, 320, 328, 3, 2, 2, 2, 321, 325, 5, 59, 29, 2, 322, 324, 5, 31, 15, 2, 323, 322, 3, 2, 2, 2, 324, 327, 3, 2, 2, 2, 325, 323, 3, 2, 2, 2, 325, 326, 3, 2, 2, 2, 326, 329, 3, 2, 2, 2, 327, 325, 3, 2, 2, 2, 328, 321, 3, 2, 2, 2, 328, 329, 3, 2, 2, 2, 329, 330, 3, 2, 2, 2, 330, 331, 5, 39, 19, 2, 331, 341, 3, 2, 2, 2, 332, 334, 5, 59, 29, 2, 333, 335, 5, 31, 15, 2, 334, 333, 3, 2, 2, 2, 335, 336, 3, 2, 2, 2, 336, 334, 3, 2, 2, 2, 336, 337, 3, 2, 2, 2, 337, 338, 3, 2, 2, 2, 338, 339, 5, 39, 19, 2, 339, 341, 3, 2, 2, 2, 340, 299, 3, 2, 2, 2, 340, 310, 3, 2, 2, 2, 340, 317, 3, 2, 2, 2, 340, 332, 3, 2, 2, 2, 341, 46, 3, 2, 2, 2, 342, 343, 7, 100, 2, 2, 343, 344, 7, 123, 2, 2, 344, 48, 3, 2, 2, 2, 345, 346, 7, 99, 2, 2, 346, 347, 7, 112, 2, 2, 347, 348, 7, 102, 2, 2, 348, 50, 3, 2, 2, 2, 349, 350, 7, 99, 2, 2, 350, 351, 7, 117, 2, 2, 351, 352, 7, 101, 2, 2, 352, 52, 3, 2, 2, 2, 353, 354, 7, 63, 2, 2, 354, 54, 3, 2, 2, 2, 355, 356, 7, 46, 2, 2, 356, 56, 3, 2, 2, 2, 357, 358, 7, 102, 2, 2, 358, 359, 7, 103, 2, 2, 359, 360, 7, 117, 2, 2, 360, 361, 7, 101, 2, 2, 361, 58, 3, 2, 2, 2, 362, 363, 7, 48, 2, 2, 363, 60, 3, 2, 2, 2, 364, 365, 7, 104, 2, 2, 365, 366, 7, 99, 2, 2, 366, 367, 7, 110, 2, 2, 367, 368, 7, 117, 2, 2, 368, 369, 7, 103, 2, 2, 369, 62, 3, 2, 2, 2, 370, 371, 7, 104, 2, 2, 371, 372, 7, 107, 2, 2, 372, 373, 7, 116, 2, 2, 373, 374, 7, 117, 2, 2, 374, 375, 7, 118, 2, 2, 375, 64, 3, 2, 2, 2, 376, 377, 7, 110, 2, 2, 377, 378, 7, 99, 2, 2, 378, 379, 7, 117, 2, 2, 379, 380, 7, 118, 2, 2, 380, 66, 3, 2, 2, 2, 381, 382, 7, 42, 2, 2, 382, 68, 3, 2, 2, 2, 383, 384, 7, 93, 2, 2, 384, 385, 3, 2, 2, 2, 385, 386, 8, 34, 6, 2, 386, 70, 3, 2, 2, 2, 387, 388, 7, 95, 2, 2, 388, 72, 3, 2, 2, 2, 389, 390, 7, 112, 2, 2, 390, 391, 7, 113, 2, 2, 391, 392, 7, 118, 2, 2, 392, 74, 3, 2, 2, 2, 393, 394, 7, 112, 2, 2, 394, 395, 7, 119, 2, 2, 395, 396, 7, 110, 2, 2, 396, 397, 7, 110, 2, 2, 397, 76, 3, 2, 2, 2, 398, 399, 7, 112, 2, 2, 399, 400, 7, 119, 2, 2, 400, 401, 7, 110, 2, 2, 401, 402, 7, 110, 2, 2, 402, 403, 7, 117, 2, 2, 403, 78, 3, 2, 2, 2, 404, 405, 7, 113, 2, 2, 405, 406, 7, 116, 2, 2, 406, 80, 3, 2, 2, 2, 407, 408, 7, 43, 2, 2, 408, 82, 3, 2, 2, 2, 409, 410, 7, 118, 2, 2, 410, 411, 7, 116, 2, 2, 411, 412, 7, 119, 2, 2, 412, 413, 7, 103, 2, 2, 413, 84, 3, 2, 2, 2, 414, 415, 7, 63, 2, 2, 415, 416, 7, 63, 2, 2, 416, 86, 3, 2, 2, 2, 417, 418, 7, 35, 2, 2, 418, 419, 7, 63, 2, 2, 419, 88, 3, 2, 2, 2, 420, 421, 7, 62, 2, 2, 421, 90, 3, 2, 2, 2, 422, 423, 7, 62, 2, 2, 423, 424, 7, 63, 2, 2, 424, 92, 3, 2, 2, 2, 425, 426, 7, 64, 2, 2, 426, 94, 3, 2, 2, 2, 427, 428, 7, 64, 2, 2, 428, 429, 7, 63, 2, 2, 429, 96, 3, 2, 2, 2, 430, 431, 7, 45, 2, 2, 431, 98, 3, 2, 2, 2, 432, 433, 7, 47, 2, 2, 433, 100, 3, 2, 2, 2, 434, 435, 7, 44, 2, 2, 435, 102, 3, 2, 2, 2, 436, 437, 7, 49, 2, 2, 437, 104, 3, 2, 2, 2, 438, 439, 7, 39, 2, 2, 439, 106, 3, 2, 2, 2, 440, 443, 5, 33, 16, 2, 441, 443, 7, 97, 2, 2, 442, 440, 3, 2, 2, 2, 442, 441, 3, 2, 2, 2, 443, 449, 3, 2, 2, 2, 444, 448, 5, 33, 16, 2, 445, 448, 5, 31, 15, 2, 446, 448, 7, 97, 2, 2, 447, 444, 3, 2, 2, 2, 447, 445, 3, 2, 2, 2, 447, 446, 3, 2, 2, 2, 448, 451, 3, 2, 2, 2, 449, 447, 3, 2, 2, 2, 449, 450, 3, 2, 2, 2, 450, 108, 3, 2, 2, 2, 451, 449, 3, 2, 2, 2, 452, 458, 7, 98, 2, 2, 453, 457, 10, 10, 2, 2, 454, 455, 7, 98, 2, 2, 455, 457, 7, 98, 2, 2, 456, 453, 3, 2, 2, 2, 456, 454, 3, 2, 2, 2, 457, 460, 3, 2, 2, 2, 458, 456, 3, 2, 2, 2, 458, 459, 3, 2, 2, 2, 459, 461, 3, 2, 2, 2, 460, 458, 3, 2, 2, 2, 461, 462, 7, 98, 2, 2, 462, 110, 3, 2, 2, 2, 463, 464, 5, 23, 11, 2, 464, 465, 3, 2, 2, 2, 465, 466, 8, 55, 4, 2, 466, 112, 3, 2, 2, 2, 467, 468, 5, 25, 12, 2, 468, 469, 3, 2, 2, 2, 469, 470, 8, 56, 4, 2, 470, 114, 3, 2, 2, 2, 471, 472, 5, 27, 13, 2, 472, 473, 3, 2, 2, 2, 473, 474, 8, 57, 4, 2, 474, 116, 3, 2, 2, 2, 475, 476, 7, 126, 2, 2, 476, 477, 3, 2, 2, 2, 477, 478, 8, 58, 7, 2, 478, 479, 8, 58, 5, 2, 479, 118, 3, 2, 2, 2, 480, 481, 7, 95, 2, 2, 481, 482, 3, 2, 2, 2, 482, 483, 8, 59, 8, 2, 483, 120, 3, 2, 2, 2, 484, 485, 7, 46, 2, 2, 485, 486, 3, 2, 2, 2, 486, 487, 8, 60, 9, 2, 487, 122, 3, 2, 2, 2, 488, 490, 10, 11, 2, 2, 489, 488, 3, 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 489, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 124, 3, 2, 2, 2, 493, 494, 5, 109, 54, 2, 494, 126, 3, 2, 2, 2, 495, 496, 5, 23, 11, 2, 496, 497, 3, 2, 2, 2, 497, 498, 8, 63, 4, 2, 498, 128, 3, 2, 2, 2, 499, 500, 5, 25, 12, 2, 500, 501, 3, 2, 2, 2, 501, 502, 8, 64, 4, 2, 502, 130, 3, 2, 2, 2, 503, 504, 5, 27, 13, 2, 504, 505, 3, 2, 2, 2, 505, 506, 8, 65, 4, 2, 506, 132, 3, 2, 2, 2, 35, 2, 3, 4, 197, 207, 211, 214, 223, 225, 236, 255, 260, 265, 267, 278, 286, 289, 291, 296, 301, 307, 314, 319, 325, 328, 336, 340, 442, 447, 449, 456, 458, 491, 10, 7, 3, 2, 7, 4, 2, 2, 3, 2, 6, 2, 2, 7, 2, 2, 9, 15, 2, 9, 31, 2, 9, 23, 2] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.java index e28ee58e87050..db644b3874422 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.java @@ -17,15 +17,15 @@ public class EsqlBaseLexer extends Lexer { protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int - EVAL=1, FROM=2, ROW=3, STATS=4, WHERE=5, SORT=6, LIMIT=7, UNKNOWN_COMMAND=8, - LINE_COMMENT=9, MULTILINE_COMMENT=10, WS=11, PIPE=12, STRING=13, INTEGER_LITERAL=14, - DECIMAL_LITERAL=15, BY=16, AND=17, ASC=18, ASSIGN=19, COMMA=20, DESC=21, - DOT=22, FALSE=23, FIRST=24, LAST=25, LP=26, NOT=27, NULL=28, NULLS=29, - OR=30, RP=31, TRUE=32, EQ=33, NEQ=34, LT=35, LTE=36, GT=37, GTE=38, PLUS=39, - MINUS=40, ASTERISK=41, SLASH=42, PERCENT=43, UNQUOTED_IDENTIFIER=44, QUOTED_IDENTIFIER=45, - EXPR_LINE_COMMENT=46, EXPR_MULTILINE_COMMENT=47, EXPR_WS=48, SRC_UNQUOTED_IDENTIFIER=49, - SRC_QUOTED_IDENTIFIER=50, SRC_LINE_COMMENT=51, SRC_MULTILINE_COMMENT=52, - SRC_WS=53; + EVAL=1, EXPLAIN=2, FROM=3, ROW=4, STATS=5, WHERE=6, SORT=7, LIMIT=8, UNKNOWN_COMMAND=9, + LINE_COMMENT=10, MULTILINE_COMMENT=11, WS=12, PIPE=13, STRING=14, INTEGER_LITERAL=15, + DECIMAL_LITERAL=16, BY=17, AND=18, ASC=19, ASSIGN=20, COMMA=21, DESC=22, + DOT=23, FALSE=24, FIRST=25, LAST=26, LP=27, OPENING_BRACKET=28, CLOSING_BRACKET=29, + NOT=30, NULL=31, NULLS=32, OR=33, RP=34, TRUE=35, EQ=36, NEQ=37, LT=38, + LTE=39, GT=40, GTE=41, PLUS=42, MINUS=43, ASTERISK=44, SLASH=45, PERCENT=46, + UNQUOTED_IDENTIFIER=47, QUOTED_IDENTIFIER=48, EXPR_LINE_COMMENT=49, EXPR_MULTILINE_COMMENT=50, + EXPR_WS=51, SRC_UNQUOTED_IDENTIFIER=52, SRC_QUOTED_IDENTIFIER=53, SRC_LINE_COMMENT=54, + SRC_MULTILINE_COMMENT=55, SRC_WS=56; public static final int EXPRESSION=1, SOURCE_IDENTIFIERS=2; public static String[] channelNames = { @@ -38,37 +38,40 @@ public class EsqlBaseLexer extends Lexer { private static String[] makeRuleNames() { return new String[] { - "EVAL", "FROM", "ROW", "STATS", "WHERE", "SORT", "LIMIT", "UNKNOWN_COMMAND", - "LINE_COMMENT", "MULTILINE_COMMENT", "WS", "PIPE", "DIGIT", "LETTER", - "ESCAPE_SEQUENCE", "UNESCAPED_CHARS", "EXPONENT", "STRING", "INTEGER_LITERAL", - "DECIMAL_LITERAL", "BY", "AND", "ASC", "ASSIGN", "COMMA", "DESC", "DOT", - "FALSE", "FIRST", "LAST", "LP", "NOT", "NULL", "NULLS", "OR", "RP", "TRUE", - "EQ", "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", + "EVAL", "EXPLAIN", "FROM", "ROW", "STATS", "WHERE", "SORT", "LIMIT", + "UNKNOWN_COMMAND", "LINE_COMMENT", "MULTILINE_COMMENT", "WS", "PIPE", + "DIGIT", "LETTER", "ESCAPE_SEQUENCE", "UNESCAPED_CHARS", "EXPONENT", + "STRING", "INTEGER_LITERAL", "DECIMAL_LITERAL", "BY", "AND", "ASC", "ASSIGN", + "COMMA", "DESC", "DOT", "FALSE", "FIRST", "LAST", "LP", "OPENING_BRACKET", + "CLOSING_BRACKET", "NOT", "NULL", "NULLS", "OR", "RP", "TRUE", "EQ", + "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", "UNQUOTED_IDENTIFIER", "QUOTED_IDENTIFIER", "EXPR_LINE_COMMENT", - "EXPR_MULTILINE_COMMENT", "EXPR_WS", "SRC_PIPE", "SRC_COMMA", "SRC_UNQUOTED_IDENTIFIER", - "SRC_QUOTED_IDENTIFIER", "SRC_LINE_COMMENT", "SRC_MULTILINE_COMMENT", - "SRC_WS" + "EXPR_MULTILINE_COMMENT", "EXPR_WS", "SRC_PIPE", "SRC_CLOSING_BRACKET", + "SRC_COMMA", "SRC_UNQUOTED_IDENTIFIER", "SRC_QUOTED_IDENTIFIER", "SRC_LINE_COMMENT", + "SRC_MULTILINE_COMMENT", "SRC_WS" }; } public static final String[] ruleNames = makeRuleNames(); private static String[] makeLiteralNames() { return new String[] { - null, "'eval'", "'from'", "'row'", "'stats'", "'where'", "'sort'", "'limit'", - null, null, null, null, null, null, null, null, "'by'", "'and'", "'asc'", - "'='", null, "'desc'", "'.'", "'false'", "'first'", "'last'", "'('", - "'not'", "'null'", "'nulls'", "'or'", "')'", "'true'", "'=='", "'!='", - "'<'", "'<='", "'>'", "'>='", "'+'", "'-'", "'*'", "'/'", "'%'" + null, "'eval'", "'explain'", "'from'", "'row'", "'stats'", "'where'", + "'sort'", "'limit'", null, null, null, null, null, null, null, null, + "'by'", "'and'", "'asc'", "'='", null, "'desc'", "'.'", "'false'", "'first'", + "'last'", "'('", "'['", null, "'not'", "'null'", "'nulls'", "'or'", "')'", + "'true'", "'=='", "'!='", "'<'", "'<='", "'>'", "'>='", "'+'", "'-'", + "'*'", "'/'", "'%'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); private static String[] makeSymbolicNames() { return new String[] { - null, "EVAL", "FROM", "ROW", "STATS", "WHERE", "SORT", "LIMIT", "UNKNOWN_COMMAND", - "LINE_COMMENT", "MULTILINE_COMMENT", "WS", "PIPE", "STRING", "INTEGER_LITERAL", - "DECIMAL_LITERAL", "BY", "AND", "ASC", "ASSIGN", "COMMA", "DESC", "DOT", - "FALSE", "FIRST", "LAST", "LP", "NOT", "NULL", "NULLS", "OR", "RP", "TRUE", - "EQ", "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", + null, "EVAL", "EXPLAIN", "FROM", "ROW", "STATS", "WHERE", "SORT", "LIMIT", + "UNKNOWN_COMMAND", "LINE_COMMENT", "MULTILINE_COMMENT", "WS", "PIPE", + "STRING", "INTEGER_LITERAL", "DECIMAL_LITERAL", "BY", "AND", "ASC", "ASSIGN", + "COMMA", "DESC", "DOT", "FALSE", "FIRST", "LAST", "LP", "OPENING_BRACKET", + "CLOSING_BRACKET", "NOT", "NULL", "NULLS", "OR", "RP", "TRUE", "EQ", + "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", "UNQUOTED_IDENTIFIER", "QUOTED_IDENTIFIER", "EXPR_LINE_COMMENT", "EXPR_MULTILINE_COMMENT", "EXPR_WS", "SRC_UNQUOTED_IDENTIFIER", "SRC_QUOTED_IDENTIFIER", "SRC_LINE_COMMENT", "SRC_MULTILINE_COMMENT", "SRC_WS" @@ -133,176 +136,185 @@ public EsqlBaseLexer(CharStream input) { public ATN getATN() { return _ATN; } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\67\u01df\b\1\b\1"+ - "\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4"+ - "\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t"+ - "\21\4\22\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t"+ - "\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t"+ - "\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4"+ - "*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63"+ - "\t\63\4\64\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;"+ - "\4<\t<\4=\t=\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+ - "\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6"+ - "\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3"+ - "\b\3\b\3\t\6\t\u00b2\n\t\r\t\16\t\u00b3\3\t\3\t\3\n\3\n\3\n\3\n\7\n\u00bc"+ - "\n\n\f\n\16\n\u00bf\13\n\3\n\5\n\u00c2\n\n\3\n\5\n\u00c5\n\n\3\n\3\n\3"+ - "\13\3\13\3\13\3\13\3\13\7\13\u00ce\n\13\f\13\16\13\u00d1\13\13\3\13\3"+ - "\13\3\13\3\13\3\13\3\f\6\f\u00d9\n\f\r\f\16\f\u00da\3\f\3\f\3\r\3\r\3"+ - "\r\3\r\3\16\3\16\3\17\3\17\3\20\3\20\3\20\3\21\3\21\3\22\3\22\5\22\u00ee"+ - "\n\22\3\22\6\22\u00f1\n\22\r\22\16\22\u00f2\3\23\3\23\3\23\7\23\u00f8"+ - "\n\23\f\23\16\23\u00fb\13\23\3\23\3\23\3\23\3\23\3\23\3\23\7\23\u0103"+ - "\n\23\f\23\16\23\u0106\13\23\3\23\3\23\3\23\3\23\3\23\5\23\u010d\n\23"+ - "\3\23\5\23\u0110\n\23\5\23\u0112\n\23\3\24\6\24\u0115\n\24\r\24\16\24"+ - "\u0116\3\25\6\25\u011a\n\25\r\25\16\25\u011b\3\25\3\25\7\25\u0120\n\25"+ - "\f\25\16\25\u0123\13\25\3\25\3\25\6\25\u0127\n\25\r\25\16\25\u0128\3\25"+ - "\6\25\u012c\n\25\r\25\16\25\u012d\3\25\3\25\7\25\u0132\n\25\f\25\16\25"+ - "\u0135\13\25\5\25\u0137\n\25\3\25\3\25\3\25\3\25\6\25\u013d\n\25\r\25"+ - "\16\25\u013e\3\25\3\25\5\25\u0143\n\25\3\26\3\26\3\26\3\27\3\27\3\27\3"+ - "\27\3\30\3\30\3\30\3\30\3\31\3\31\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3"+ - "\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36\3\36\3"+ - "\37\3\37\3\37\3\37\3\37\3 \3 \3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3#\3#\3"+ - "#\3#\3#\3#\3$\3$\3$\3%\3%\3&\3&\3&\3&\3&\3\'\3\'\3\'\3(\3(\3(\3)\3)\3"+ - "*\3*\3*\3+\3+\3,\3,\3,\3-\3-\3.\3.\3/\3/\3\60\3\60\3\61\3\61\3\62\3\62"+ - "\5\62\u01a3\n\62\3\62\3\62\3\62\7\62\u01a8\n\62\f\62\16\62\u01ab\13\62"+ - "\3\63\3\63\3\63\3\63\7\63\u01b1\n\63\f\63\16\63\u01b4\13\63\3\63\3\63"+ - "\3\64\3\64\3\64\3\64\3\65\3\65\3\65\3\65\3\66\3\66\3\66\3\66\3\67\3\67"+ - "\3\67\3\67\3\67\38\38\38\38\39\69\u01ce\n9\r9\169\u01cf\3:\3:\3;\3;\3"+ - ";\3;\3<\3<\3<\3<\3=\3=\3=\3=\4\u00cf\u0104\2>\5\3\7\4\t\5\13\6\r\7\17"+ - "\b\21\t\23\n\25\13\27\f\31\r\33\16\35\2\37\2!\2#\2%\2\'\17)\20+\21-\22"+ - "/\23\61\24\63\25\65\26\67\279\30;\31=\32?\33A\34C\35E\36G\37I K!M\"O#"+ - "Q$S%U&W\'Y([)]*_+a,c-e.g/i\60k\61m\62o\2q\2s\63u\64w\65y\66{\67\5\2\3"+ - "\4\f\5\2\13\f\17\17\"\"\4\2\f\f\17\17\3\2\62;\4\2C\\c|\7\2$$^^ppttvv\6"+ - "\2\f\f\17\17$$^^\4\2GGgg\4\2--//\3\2bb\t\2\13\f\17\17\"\"..\60\60bb~~"+ - "\2\u01f8\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2"+ - "\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31"+ - "\3\2\2\2\3\33\3\2\2\2\3\'\3\2\2\2\3)\3\2\2\2\3+\3\2\2\2\3-\3\2\2\2\3/"+ - "\3\2\2\2\3\61\3\2\2\2\3\63\3\2\2\2\3\65\3\2\2\2\3\67\3\2\2\2\39\3\2\2"+ - "\2\3;\3\2\2\2\3=\3\2\2\2\3?\3\2\2\2\3A\3\2\2\2\3C\3\2\2\2\3E\3\2\2\2\3"+ - "G\3\2\2\2\3I\3\2\2\2\3K\3\2\2\2\3M\3\2\2\2\3O\3\2\2\2\3Q\3\2\2\2\3S\3"+ - "\2\2\2\3U\3\2\2\2\3W\3\2\2\2\3Y\3\2\2\2\3[\3\2\2\2\3]\3\2\2\2\3_\3\2\2"+ - "\2\3a\3\2\2\2\3c\3\2\2\2\3e\3\2\2\2\3g\3\2\2\2\3i\3\2\2\2\3k\3\2\2\2\3"+ - "m\3\2\2\2\4o\3\2\2\2\4q\3\2\2\2\4s\3\2\2\2\4u\3\2\2\2\4w\3\2\2\2\4y\3"+ - "\2\2\2\4{\3\2\2\2\5}\3\2\2\2\7\u0084\3\2\2\2\t\u008b\3\2\2\2\13\u0091"+ - "\3\2\2\2\r\u0099\3\2\2\2\17\u00a1\3\2\2\2\21\u00a8\3\2\2\2\23\u00b1\3"+ - "\2\2\2\25\u00b7\3\2\2\2\27\u00c8\3\2\2\2\31\u00d8\3\2\2\2\33\u00de\3\2"+ - "\2\2\35\u00e2\3\2\2\2\37\u00e4\3\2\2\2!\u00e6\3\2\2\2#\u00e9\3\2\2\2%"+ - "\u00eb\3\2\2\2\'\u0111\3\2\2\2)\u0114\3\2\2\2+\u0142\3\2\2\2-\u0144\3"+ - "\2\2\2/\u0147\3\2\2\2\61\u014b\3\2\2\2\63\u014f\3\2\2\2\65\u0151\3\2\2"+ - "\2\67\u0153\3\2\2\29\u0158\3\2\2\2;\u015a\3\2\2\2=\u0160\3\2\2\2?\u0166"+ - "\3\2\2\2A\u016b\3\2\2\2C\u016d\3\2\2\2E\u0171\3\2\2\2G\u0176\3\2\2\2I"+ - "\u017c\3\2\2\2K\u017f\3\2\2\2M\u0181\3\2\2\2O\u0186\3\2\2\2Q\u0189\3\2"+ - "\2\2S\u018c\3\2\2\2U\u018e\3\2\2\2W\u0191\3\2\2\2Y\u0193\3\2\2\2[\u0196"+ - "\3\2\2\2]\u0198\3\2\2\2_\u019a\3\2\2\2a\u019c\3\2\2\2c\u019e\3\2\2\2e"+ - "\u01a2\3\2\2\2g\u01ac\3\2\2\2i\u01b7\3\2\2\2k\u01bb\3\2\2\2m\u01bf\3\2"+ - "\2\2o\u01c3\3\2\2\2q\u01c8\3\2\2\2s\u01cd\3\2\2\2u\u01d1\3\2\2\2w\u01d3"+ - "\3\2\2\2y\u01d7\3\2\2\2{\u01db\3\2\2\2}~\7g\2\2~\177\7x\2\2\177\u0080"+ - "\7c\2\2\u0080\u0081\7n\2\2\u0081\u0082\3\2\2\2\u0082\u0083\b\2\2\2\u0083"+ - "\6\3\2\2\2\u0084\u0085\7h\2\2\u0085\u0086\7t\2\2\u0086\u0087\7q\2\2\u0087"+ - "\u0088\7o\2\2\u0088\u0089\3\2\2\2\u0089\u008a\b\3\3\2\u008a\b\3\2\2\2"+ - "\u008b\u008c\7t\2\2\u008c\u008d\7q\2\2\u008d\u008e\7y\2\2\u008e\u008f"+ - "\3\2\2\2\u008f\u0090\b\4\2\2\u0090\n\3\2\2\2\u0091\u0092\7u\2\2\u0092"+ - "\u0093\7v\2\2\u0093\u0094\7c\2\2\u0094\u0095\7v\2\2\u0095\u0096\7u\2\2"+ - "\u0096\u0097\3\2\2\2\u0097\u0098\b\5\2\2\u0098\f\3\2\2\2\u0099\u009a\7"+ - "y\2\2\u009a\u009b\7j\2\2\u009b\u009c\7g\2\2\u009c\u009d\7t\2\2\u009d\u009e"+ - "\7g\2\2\u009e\u009f\3\2\2\2\u009f\u00a0\b\6\2\2\u00a0\16\3\2\2\2\u00a1"+ - "\u00a2\7u\2\2\u00a2\u00a3\7q\2\2\u00a3\u00a4\7t\2\2\u00a4\u00a5\7v\2\2"+ - "\u00a5\u00a6\3\2\2\2\u00a6\u00a7\b\7\2\2\u00a7\20\3\2\2\2\u00a8\u00a9"+ - "\7n\2\2\u00a9\u00aa\7k\2\2\u00aa\u00ab\7o\2\2\u00ab\u00ac\7k\2\2\u00ac"+ - "\u00ad\7v\2\2\u00ad\u00ae\3\2\2\2\u00ae\u00af\b\b\2\2\u00af\22\3\2\2\2"+ - "\u00b0\u00b2\n\2\2\2\u00b1\u00b0\3\2\2\2\u00b2\u00b3\3\2\2\2\u00b3\u00b1"+ - "\3\2\2\2\u00b3\u00b4\3\2\2\2\u00b4\u00b5\3\2\2\2\u00b5\u00b6\b\t\2\2\u00b6"+ - "\24\3\2\2\2\u00b7\u00b8\7\61\2\2\u00b8\u00b9\7\61\2\2\u00b9\u00bd\3\2"+ - "\2\2\u00ba\u00bc\n\3\2\2\u00bb\u00ba\3\2\2\2\u00bc\u00bf\3\2\2\2\u00bd"+ - "\u00bb\3\2\2\2\u00bd\u00be\3\2\2\2\u00be\u00c1\3\2\2\2\u00bf\u00bd\3\2"+ - "\2\2\u00c0\u00c2\7\17\2\2\u00c1\u00c0\3\2\2\2\u00c1\u00c2\3\2\2\2\u00c2"+ - "\u00c4\3\2\2\2\u00c3\u00c5\7\f\2\2\u00c4\u00c3\3\2\2\2\u00c4\u00c5\3\2"+ - "\2\2\u00c5\u00c6\3\2\2\2\u00c6\u00c7\b\n\4\2\u00c7\26\3\2\2\2\u00c8\u00c9"+ - "\7\61\2\2\u00c9\u00ca\7,\2\2\u00ca\u00cf\3\2\2\2\u00cb\u00ce\5\27\13\2"+ - "\u00cc\u00ce\13\2\2\2\u00cd\u00cb\3\2\2\2\u00cd\u00cc\3\2\2\2\u00ce\u00d1"+ - "\3\2\2\2\u00cf\u00d0\3\2\2\2\u00cf\u00cd\3\2\2\2\u00d0\u00d2\3\2\2\2\u00d1"+ - "\u00cf\3\2\2\2\u00d2\u00d3\7,\2\2\u00d3\u00d4\7\61\2\2\u00d4\u00d5\3\2"+ - "\2\2\u00d5\u00d6\b\13\4\2\u00d6\30\3\2\2\2\u00d7\u00d9\t\2\2\2\u00d8\u00d7"+ - "\3\2\2\2\u00d9\u00da\3\2\2\2\u00da\u00d8\3\2\2\2\u00da\u00db\3\2\2\2\u00db"+ - "\u00dc\3\2\2\2\u00dc\u00dd\b\f\4\2\u00dd\32\3\2\2\2\u00de\u00df\7~\2\2"+ - "\u00df\u00e0\3\2\2\2\u00e0\u00e1\b\r\5\2\u00e1\34\3\2\2\2\u00e2\u00e3"+ - "\t\4\2\2\u00e3\36\3\2\2\2\u00e4\u00e5\t\5\2\2\u00e5 \3\2\2\2\u00e6\u00e7"+ - "\7^\2\2\u00e7\u00e8\t\6\2\2\u00e8\"\3\2\2\2\u00e9\u00ea\n\7\2\2\u00ea"+ - "$\3\2\2\2\u00eb\u00ed\t\b\2\2\u00ec\u00ee\t\t\2\2\u00ed\u00ec\3\2\2\2"+ - "\u00ed\u00ee\3\2\2\2\u00ee\u00f0\3\2\2\2\u00ef\u00f1\5\35\16\2\u00f0\u00ef"+ - "\3\2\2\2\u00f1\u00f2\3\2\2\2\u00f2\u00f0\3\2\2\2\u00f2\u00f3\3\2\2\2\u00f3"+ - "&\3\2\2\2\u00f4\u00f9\7$\2\2\u00f5\u00f8\5!\20\2\u00f6\u00f8\5#\21\2\u00f7"+ - "\u00f5\3\2\2\2\u00f7\u00f6\3\2\2\2\u00f8\u00fb\3\2\2\2\u00f9\u00f7\3\2"+ - "\2\2\u00f9\u00fa\3\2\2\2\u00fa\u00fc\3\2\2\2\u00fb\u00f9\3\2\2\2\u00fc"+ - "\u0112\7$\2\2\u00fd\u00fe\7$\2\2\u00fe\u00ff\7$\2\2\u00ff\u0100\7$\2\2"+ - "\u0100\u0104\3\2\2\2\u0101\u0103\n\3\2\2\u0102\u0101\3\2\2\2\u0103\u0106"+ - "\3\2\2\2\u0104\u0105\3\2\2\2\u0104\u0102\3\2\2\2\u0105\u0107\3\2\2\2\u0106"+ - "\u0104\3\2\2\2\u0107\u0108\7$\2\2\u0108\u0109\7$\2\2\u0109\u010a\7$\2"+ - "\2\u010a\u010c\3\2\2\2\u010b\u010d\7$\2\2\u010c\u010b\3\2\2\2\u010c\u010d"+ - "\3\2\2\2\u010d\u010f\3\2\2\2\u010e\u0110\7$\2\2\u010f\u010e\3\2\2\2\u010f"+ - "\u0110\3\2\2\2\u0110\u0112\3\2\2\2\u0111\u00f4\3\2\2\2\u0111\u00fd\3\2"+ - "\2\2\u0112(\3\2\2\2\u0113\u0115\5\35\16\2\u0114\u0113\3\2\2\2\u0115\u0116"+ - "\3\2\2\2\u0116\u0114\3\2\2\2\u0116\u0117\3\2\2\2\u0117*\3\2\2\2\u0118"+ - "\u011a\5\35\16\2\u0119\u0118\3\2\2\2\u011a\u011b\3\2\2\2\u011b\u0119\3"+ - "\2\2\2\u011b\u011c\3\2\2\2\u011c\u011d\3\2\2\2\u011d\u0121\59\34\2\u011e"+ - "\u0120\5\35\16\2\u011f\u011e\3\2\2\2\u0120\u0123\3\2\2\2\u0121\u011f\3"+ - "\2\2\2\u0121\u0122\3\2\2\2\u0122\u0143\3\2\2\2\u0123\u0121\3\2\2\2\u0124"+ - "\u0126\59\34\2\u0125\u0127\5\35\16\2\u0126\u0125\3\2\2\2\u0127\u0128\3"+ - "\2\2\2\u0128\u0126\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u0143\3\2\2\2\u012a"+ - "\u012c\5\35\16\2\u012b\u012a\3\2\2\2\u012c\u012d\3\2\2\2\u012d\u012b\3"+ - "\2\2\2\u012d\u012e\3\2\2\2\u012e\u0136\3\2\2\2\u012f\u0133\59\34\2\u0130"+ - "\u0132\5\35\16\2\u0131\u0130\3\2\2\2\u0132\u0135\3\2\2\2\u0133\u0131\3"+ - "\2\2\2\u0133\u0134\3\2\2\2\u0134\u0137\3\2\2\2\u0135\u0133\3\2\2\2\u0136"+ - "\u012f\3\2\2\2\u0136\u0137\3\2\2\2\u0137\u0138\3\2\2\2\u0138\u0139\5%"+ - "\22\2\u0139\u0143\3\2\2\2\u013a\u013c\59\34\2\u013b\u013d\5\35\16\2\u013c"+ - "\u013b\3\2\2\2\u013d\u013e\3\2\2\2\u013e\u013c\3\2\2\2\u013e\u013f\3\2"+ - "\2\2\u013f\u0140\3\2\2\2\u0140\u0141\5%\22\2\u0141\u0143\3\2\2\2\u0142"+ - "\u0119\3\2\2\2\u0142\u0124\3\2\2\2\u0142\u012b\3\2\2\2\u0142\u013a\3\2"+ - "\2\2\u0143,\3\2\2\2\u0144\u0145\7d\2\2\u0145\u0146\7{\2\2\u0146.\3\2\2"+ - "\2\u0147\u0148\7c\2\2\u0148\u0149\7p\2\2\u0149\u014a\7f\2\2\u014a\60\3"+ - "\2\2\2\u014b\u014c\7c\2\2\u014c\u014d\7u\2\2\u014d\u014e\7e\2\2\u014e"+ - "\62\3\2\2\2\u014f\u0150\7?\2\2\u0150\64\3\2\2\2\u0151\u0152\7.\2\2\u0152"+ - "\66\3\2\2\2\u0153\u0154\7f\2\2\u0154\u0155\7g\2\2\u0155\u0156\7u\2\2\u0156"+ - "\u0157\7e\2\2\u01578\3\2\2\2\u0158\u0159\7\60\2\2\u0159:\3\2\2\2\u015a"+ - "\u015b\7h\2\2\u015b\u015c\7c\2\2\u015c\u015d\7n\2\2\u015d\u015e\7u\2\2"+ - "\u015e\u015f\7g\2\2\u015f<\3\2\2\2\u0160\u0161\7h\2\2\u0161\u0162\7k\2"+ - "\2\u0162\u0163\7t\2\2\u0163\u0164\7u\2\2\u0164\u0165\7v\2\2\u0165>\3\2"+ - "\2\2\u0166\u0167\7n\2\2\u0167\u0168\7c\2\2\u0168\u0169\7u\2\2\u0169\u016a"+ - "\7v\2\2\u016a@\3\2\2\2\u016b\u016c\7*\2\2\u016cB\3\2\2\2\u016d\u016e\7"+ - "p\2\2\u016e\u016f\7q\2\2\u016f\u0170\7v\2\2\u0170D\3\2\2\2\u0171\u0172"+ - "\7p\2\2\u0172\u0173\7w\2\2\u0173\u0174\7n\2\2\u0174\u0175\7n\2\2\u0175"+ - "F\3\2\2\2\u0176\u0177\7p\2\2\u0177\u0178\7w\2\2\u0178\u0179\7n\2\2\u0179"+ - "\u017a\7n\2\2\u017a\u017b\7u\2\2\u017bH\3\2\2\2\u017c\u017d\7q\2\2\u017d"+ - "\u017e\7t\2\2\u017eJ\3\2\2\2\u017f\u0180\7+\2\2\u0180L\3\2\2\2\u0181\u0182"+ - "\7v\2\2\u0182\u0183\7t\2\2\u0183\u0184\7w\2\2\u0184\u0185\7g\2\2\u0185"+ - "N\3\2\2\2\u0186\u0187\7?\2\2\u0187\u0188\7?\2\2\u0188P\3\2\2\2\u0189\u018a"+ - "\7#\2\2\u018a\u018b\7?\2\2\u018bR\3\2\2\2\u018c\u018d\7>\2\2\u018dT\3"+ - "\2\2\2\u018e\u018f\7>\2\2\u018f\u0190\7?\2\2\u0190V\3\2\2\2\u0191\u0192"+ - "\7@\2\2\u0192X\3\2\2\2\u0193\u0194\7@\2\2\u0194\u0195\7?\2\2\u0195Z\3"+ - "\2\2\2\u0196\u0197\7-\2\2\u0197\\\3\2\2\2\u0198\u0199\7/\2\2\u0199^\3"+ - "\2\2\2\u019a\u019b\7,\2\2\u019b`\3\2\2\2\u019c\u019d\7\61\2\2\u019db\3"+ - "\2\2\2\u019e\u019f\7\'\2\2\u019fd\3\2\2\2\u01a0\u01a3\5\37\17\2\u01a1"+ - "\u01a3\7a\2\2\u01a2\u01a0\3\2\2\2\u01a2\u01a1\3\2\2\2\u01a3\u01a9\3\2"+ - "\2\2\u01a4\u01a8\5\37\17\2\u01a5\u01a8\5\35\16\2\u01a6\u01a8\7a\2\2\u01a7"+ - "\u01a4\3\2\2\2\u01a7\u01a5\3\2\2\2\u01a7\u01a6\3\2\2\2\u01a8\u01ab\3\2"+ - "\2\2\u01a9\u01a7\3\2\2\2\u01a9\u01aa\3\2\2\2\u01aaf\3\2\2\2\u01ab\u01a9"+ - "\3\2\2\2\u01ac\u01b2\7b\2\2\u01ad\u01b1\n\n\2\2\u01ae\u01af\7b\2\2\u01af"+ - "\u01b1\7b\2\2\u01b0\u01ad\3\2\2\2\u01b0\u01ae\3\2\2\2\u01b1\u01b4\3\2"+ - "\2\2\u01b2\u01b0\3\2\2\2\u01b2\u01b3\3\2\2\2\u01b3\u01b5\3\2\2\2\u01b4"+ - "\u01b2\3\2\2\2\u01b5\u01b6\7b\2\2\u01b6h\3\2\2\2\u01b7\u01b8\5\25\n\2"+ - "\u01b8\u01b9\3\2\2\2\u01b9\u01ba\b\64\4\2\u01baj\3\2\2\2\u01bb\u01bc\5"+ - "\27\13\2\u01bc\u01bd\3\2\2\2\u01bd\u01be\b\65\4\2\u01bel\3\2\2\2\u01bf"+ - "\u01c0\5\31\f\2\u01c0\u01c1\3\2\2\2\u01c1\u01c2\b\66\4\2\u01c2n\3\2\2"+ - "\2\u01c3\u01c4\7~\2\2\u01c4\u01c5\3\2\2\2\u01c5\u01c6\b\67\6\2\u01c6\u01c7"+ - "\b\67\5\2\u01c7p\3\2\2\2\u01c8\u01c9\7.\2\2\u01c9\u01ca\3\2\2\2\u01ca"+ - "\u01cb\b8\7\2\u01cbr\3\2\2\2\u01cc\u01ce\n\13\2\2\u01cd\u01cc\3\2\2\2"+ - "\u01ce\u01cf\3\2\2\2\u01cf\u01cd\3\2\2\2\u01cf\u01d0\3\2\2\2\u01d0t\3"+ - "\2\2\2\u01d1\u01d2\5g\63\2\u01d2v\3\2\2\2\u01d3\u01d4\5\25\n\2\u01d4\u01d5"+ - "\3\2\2\2\u01d5\u01d6\b;\4\2\u01d6x\3\2\2\2\u01d7\u01d8\5\27\13\2\u01d8"+ - "\u01d9\3\2\2\2\u01d9\u01da\b<\4\2\u01daz\3\2\2\2\u01db\u01dc\5\31\f\2"+ - "\u01dc\u01dd\3\2\2\2\u01dd\u01de\b=\4\2\u01de|\3\2\2\2#\2\3\4\u00b3\u00bd"+ - "\u00c1\u00c4\u00cd\u00cf\u00da\u00ed\u00f2\u00f7\u00f9\u0104\u010c\u010f"+ - "\u0111\u0116\u011b\u0121\u0128\u012d\u0133\u0136\u013e\u0142\u01a2\u01a7"+ - "\u01a9\u01b0\u01b2\u01cf\b\7\3\2\7\4\2\2\3\2\6\2\2\t\16\2\t\26\2"; + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2:\u01fb\b\1\b\1\b"+ + "\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n"+ + "\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21"+ + "\4\22\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30"+ + "\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37"+ + "\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t"+ + "*\4+\t+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63"+ + "\4\64\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t"+ + "<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3"+ + "\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5"+ + "\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3"+ + "\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\n"+ + "\6\n\u00c4\n\n\r\n\16\n\u00c5\3\n\3\n\3\13\3\13\3\13\3\13\7\13\u00ce\n"+ + "\13\f\13\16\13\u00d1\13\13\3\13\5\13\u00d4\n\13\3\13\5\13\u00d7\n\13\3"+ + "\13\3\13\3\f\3\f\3\f\3\f\3\f\7\f\u00e0\n\f\f\f\16\f\u00e3\13\f\3\f\3\f"+ + "\3\f\3\f\3\f\3\r\6\r\u00eb\n\r\r\r\16\r\u00ec\3\r\3\r\3\16\3\16\3\16\3"+ + "\16\3\17\3\17\3\20\3\20\3\21\3\21\3\21\3\22\3\22\3\23\3\23\5\23\u0100"+ + "\n\23\3\23\6\23\u0103\n\23\r\23\16\23\u0104\3\24\3\24\3\24\7\24\u010a"+ + "\n\24\f\24\16\24\u010d\13\24\3\24\3\24\3\24\3\24\3\24\3\24\7\24\u0115"+ + "\n\24\f\24\16\24\u0118\13\24\3\24\3\24\3\24\3\24\3\24\5\24\u011f\n\24"+ + "\3\24\5\24\u0122\n\24\5\24\u0124\n\24\3\25\6\25\u0127\n\25\r\25\16\25"+ + "\u0128\3\26\6\26\u012c\n\26\r\26\16\26\u012d\3\26\3\26\7\26\u0132\n\26"+ + "\f\26\16\26\u0135\13\26\3\26\3\26\6\26\u0139\n\26\r\26\16\26\u013a\3\26"+ + "\6\26\u013e\n\26\r\26\16\26\u013f\3\26\3\26\7\26\u0144\n\26\f\26\16\26"+ + "\u0147\13\26\5\26\u0149\n\26\3\26\3\26\3\26\3\26\6\26\u014f\n\26\r\26"+ + "\16\26\u0150\3\26\3\26\5\26\u0155\n\26\3\27\3\27\3\27\3\30\3\30\3\30\3"+ + "\30\3\31\3\31\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3"+ + "\35\3\35\3\36\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37\3"+ + " \3 \3 \3 \3 \3!\3!\3\"\3\"\3\"\3\"\3#\3#\3$\3$\3$\3$\3%\3%\3%\3%\3%\3"+ + "&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3(\3(\3)\3)\3)\3)\3)\3*\3*\3*\3+\3+\3+\3"+ + ",\3,\3-\3-\3-\3.\3.\3/\3/\3/\3\60\3\60\3\61\3\61\3\62\3\62\3\63\3\63\3"+ + "\64\3\64\3\65\3\65\5\65\u01bb\n\65\3\65\3\65\3\65\7\65\u01c0\n\65\f\65"+ + "\16\65\u01c3\13\65\3\66\3\66\3\66\3\66\7\66\u01c9\n\66\f\66\16\66\u01cc"+ + "\13\66\3\66\3\66\3\67\3\67\3\67\3\67\38\38\38\38\39\39\39\39\3:\3:\3:"+ + "\3:\3:\3;\3;\3;\3;\3<\3<\3<\3<\3=\6=\u01ea\n=\r=\16=\u01eb\3>\3>\3?\3"+ + "?\3?\3?\3@\3@\3@\3@\3A\3A\3A\3A\4\u00e1\u0116\2B\5\3\7\4\t\5\13\6\r\7"+ + "\17\b\21\t\23\n\25\13\27\f\31\r\33\16\35\17\37\2!\2#\2%\2\'\2)\20+\21"+ + "-\22/\23\61\24\63\25\65\26\67\279\30;\31=\32?\33A\34C\35E\36G\37I K!M"+ + "\"O#Q$S%U&W\'Y([)]*_+a,c-e.g/i\60k\61m\62o\63q\64s\65u\2w\2y\2{\66}\67"+ + "\1778\u00819\u0083:\5\2\3\4\f\5\2\13\f\17\17\"\"\4\2\f\f\17\17\3\2\62"+ + ";\4\2C\\c|\7\2$$^^ppttvv\6\2\f\f\17\17$$^^\4\2GGgg\4\2--//\3\2bb\t\2\13"+ + "\f\17\17\"\"..\60\60bb~~\2\u0214\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2"+ + "\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3"+ + "\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\3\35\3\2\2\2\3)\3\2\2\2"+ + "\3+\3\2\2\2\3-\3\2\2\2\3/\3\2\2\2\3\61\3\2\2\2\3\63\3\2\2\2\3\65\3\2\2"+ + "\2\3\67\3\2\2\2\39\3\2\2\2\3;\3\2\2\2\3=\3\2\2\2\3?\3\2\2\2\3A\3\2\2\2"+ + "\3C\3\2\2\2\3E\3\2\2\2\3G\3\2\2\2\3I\3\2\2\2\3K\3\2\2\2\3M\3\2\2\2\3O"+ + "\3\2\2\2\3Q\3\2\2\2\3S\3\2\2\2\3U\3\2\2\2\3W\3\2\2\2\3Y\3\2\2\2\3[\3\2"+ + "\2\2\3]\3\2\2\2\3_\3\2\2\2\3a\3\2\2\2\3c\3\2\2\2\3e\3\2\2\2\3g\3\2\2\2"+ + "\3i\3\2\2\2\3k\3\2\2\2\3m\3\2\2\2\3o\3\2\2\2\3q\3\2\2\2\3s\3\2\2\2\4u"+ + "\3\2\2\2\4w\3\2\2\2\4y\3\2\2\2\4{\3\2\2\2\4}\3\2\2\2\4\177\3\2\2\2\4\u0081"+ + "\3\2\2\2\4\u0083\3\2\2\2\5\u0085\3\2\2\2\7\u008c\3\2\2\2\t\u0096\3\2\2"+ + "\2\13\u009d\3\2\2\2\r\u00a3\3\2\2\2\17\u00ab\3\2\2\2\21\u00b3\3\2\2\2"+ + "\23\u00ba\3\2\2\2\25\u00c3\3\2\2\2\27\u00c9\3\2\2\2\31\u00da\3\2\2\2\33"+ + "\u00ea\3\2\2\2\35\u00f0\3\2\2\2\37\u00f4\3\2\2\2!\u00f6\3\2\2\2#\u00f8"+ + "\3\2\2\2%\u00fb\3\2\2\2\'\u00fd\3\2\2\2)\u0123\3\2\2\2+\u0126\3\2\2\2"+ + "-\u0154\3\2\2\2/\u0156\3\2\2\2\61\u0159\3\2\2\2\63\u015d\3\2\2\2\65\u0161"+ + "\3\2\2\2\67\u0163\3\2\2\29\u0165\3\2\2\2;\u016a\3\2\2\2=\u016c\3\2\2\2"+ + "?\u0172\3\2\2\2A\u0178\3\2\2\2C\u017d\3\2\2\2E\u017f\3\2\2\2G\u0183\3"+ + "\2\2\2I\u0185\3\2\2\2K\u0189\3\2\2\2M\u018e\3\2\2\2O\u0194\3\2\2\2Q\u0197"+ + "\3\2\2\2S\u0199\3\2\2\2U\u019e\3\2\2\2W\u01a1\3\2\2\2Y\u01a4\3\2\2\2["+ + "\u01a6\3\2\2\2]\u01a9\3\2\2\2_\u01ab\3\2\2\2a\u01ae\3\2\2\2c\u01b0\3\2"+ + "\2\2e\u01b2\3\2\2\2g\u01b4\3\2\2\2i\u01b6\3\2\2\2k\u01ba\3\2\2\2m\u01c4"+ + "\3\2\2\2o\u01cf\3\2\2\2q\u01d3\3\2\2\2s\u01d7\3\2\2\2u\u01db\3\2\2\2w"+ + "\u01e0\3\2\2\2y\u01e4\3\2\2\2{\u01e9\3\2\2\2}\u01ed\3\2\2\2\177\u01ef"+ + "\3\2\2\2\u0081\u01f3\3\2\2\2\u0083\u01f7\3\2\2\2\u0085\u0086\7g\2\2\u0086"+ + "\u0087\7x\2\2\u0087\u0088\7c\2\2\u0088\u0089\7n\2\2\u0089\u008a\3\2\2"+ + "\2\u008a\u008b\b\2\2\2\u008b\6\3\2\2\2\u008c\u008d\7g\2\2\u008d\u008e"+ + "\7z\2\2\u008e\u008f\7r\2\2\u008f\u0090\7n\2\2\u0090\u0091\7c\2\2\u0091"+ + "\u0092\7k\2\2\u0092\u0093\7p\2\2\u0093\u0094\3\2\2\2\u0094\u0095\b\3\2"+ + "\2\u0095\b\3\2\2\2\u0096\u0097\7h\2\2\u0097\u0098\7t\2\2\u0098\u0099\7"+ + "q\2\2\u0099\u009a\7o\2\2\u009a\u009b\3\2\2\2\u009b\u009c\b\4\3\2\u009c"+ + "\n\3\2\2\2\u009d\u009e\7t\2\2\u009e\u009f\7q\2\2\u009f\u00a0\7y\2\2\u00a0"+ + "\u00a1\3\2\2\2\u00a1\u00a2\b\5\2\2\u00a2\f\3\2\2\2\u00a3\u00a4\7u\2\2"+ + "\u00a4\u00a5\7v\2\2\u00a5\u00a6\7c\2\2\u00a6\u00a7\7v\2\2\u00a7\u00a8"+ + "\7u\2\2\u00a8\u00a9\3\2\2\2\u00a9\u00aa\b\6\2\2\u00aa\16\3\2\2\2\u00ab"+ + "\u00ac\7y\2\2\u00ac\u00ad\7j\2\2\u00ad\u00ae\7g\2\2\u00ae\u00af\7t\2\2"+ + "\u00af\u00b0\7g\2\2\u00b0\u00b1\3\2\2\2\u00b1\u00b2\b\7\2\2\u00b2\20\3"+ + "\2\2\2\u00b3\u00b4\7u\2\2\u00b4\u00b5\7q\2\2\u00b5\u00b6\7t\2\2\u00b6"+ + "\u00b7\7v\2\2\u00b7\u00b8\3\2\2\2\u00b8\u00b9\b\b\2\2\u00b9\22\3\2\2\2"+ + "\u00ba\u00bb\7n\2\2\u00bb\u00bc\7k\2\2\u00bc\u00bd\7o\2\2\u00bd\u00be"+ + "\7k\2\2\u00be\u00bf\7v\2\2\u00bf\u00c0\3\2\2\2\u00c0\u00c1\b\t\2\2\u00c1"+ + "\24\3\2\2\2\u00c2\u00c4\n\2\2\2\u00c3\u00c2\3\2\2\2\u00c4\u00c5\3\2\2"+ + "\2\u00c5\u00c3\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6\u00c7\3\2\2\2\u00c7\u00c8"+ + "\b\n\2\2\u00c8\26\3\2\2\2\u00c9\u00ca\7\61\2\2\u00ca\u00cb\7\61\2\2\u00cb"+ + "\u00cf\3\2\2\2\u00cc\u00ce\n\3\2\2\u00cd\u00cc\3\2\2\2\u00ce\u00d1\3\2"+ + "\2\2\u00cf\u00cd\3\2\2\2\u00cf\u00d0\3\2\2\2\u00d0\u00d3\3\2\2\2\u00d1"+ + "\u00cf\3\2\2\2\u00d2\u00d4\7\17\2\2\u00d3\u00d2\3\2\2\2\u00d3\u00d4\3"+ + "\2\2\2\u00d4\u00d6\3\2\2\2\u00d5\u00d7\7\f\2\2\u00d6\u00d5\3\2\2\2\u00d6"+ + "\u00d7\3\2\2\2\u00d7\u00d8\3\2\2\2\u00d8\u00d9\b\13\4\2\u00d9\30\3\2\2"+ + "\2\u00da\u00db\7\61\2\2\u00db\u00dc\7,\2\2\u00dc\u00e1\3\2\2\2\u00dd\u00e0"+ + "\5\31\f\2\u00de\u00e0\13\2\2\2\u00df\u00dd\3\2\2\2\u00df\u00de\3\2\2\2"+ + "\u00e0\u00e3\3\2\2\2\u00e1\u00e2\3\2\2\2\u00e1\u00df\3\2\2\2\u00e2\u00e4"+ + "\3\2\2\2\u00e3\u00e1\3\2\2\2\u00e4\u00e5\7,\2\2\u00e5\u00e6\7\61\2\2\u00e6"+ + "\u00e7\3\2\2\2\u00e7\u00e8\b\f\4\2\u00e8\32\3\2\2\2\u00e9\u00eb\t\2\2"+ + "\2\u00ea\u00e9\3\2\2\2\u00eb\u00ec\3\2\2\2\u00ec\u00ea\3\2\2\2\u00ec\u00ed"+ + "\3\2\2\2\u00ed\u00ee\3\2\2\2\u00ee\u00ef\b\r\4\2\u00ef\34\3\2\2\2\u00f0"+ + "\u00f1\7~\2\2\u00f1\u00f2\3\2\2\2\u00f2\u00f3\b\16\5\2\u00f3\36\3\2\2"+ + "\2\u00f4\u00f5\t\4\2\2\u00f5 \3\2\2\2\u00f6\u00f7\t\5\2\2\u00f7\"\3\2"+ + "\2\2\u00f8\u00f9\7^\2\2\u00f9\u00fa\t\6\2\2\u00fa$\3\2\2\2\u00fb\u00fc"+ + "\n\7\2\2\u00fc&\3\2\2\2\u00fd\u00ff\t\b\2\2\u00fe\u0100\t\t\2\2\u00ff"+ + "\u00fe\3\2\2\2\u00ff\u0100\3\2\2\2\u0100\u0102\3\2\2\2\u0101\u0103\5\37"+ + "\17\2\u0102\u0101\3\2\2\2\u0103\u0104\3\2\2\2\u0104\u0102\3\2\2\2\u0104"+ + "\u0105\3\2\2\2\u0105(\3\2\2\2\u0106\u010b\7$\2\2\u0107\u010a\5#\21\2\u0108"+ + "\u010a\5%\22\2\u0109\u0107\3\2\2\2\u0109\u0108\3\2\2\2\u010a\u010d\3\2"+ + "\2\2\u010b\u0109\3\2\2\2\u010b\u010c\3\2\2\2\u010c\u010e\3\2\2\2\u010d"+ + "\u010b\3\2\2\2\u010e\u0124\7$\2\2\u010f\u0110\7$\2\2\u0110\u0111\7$\2"+ + "\2\u0111\u0112\7$\2\2\u0112\u0116\3\2\2\2\u0113\u0115\n\3\2\2\u0114\u0113"+ + "\3\2\2\2\u0115\u0118\3\2\2\2\u0116\u0117\3\2\2\2\u0116\u0114\3\2\2\2\u0117"+ + "\u0119\3\2\2\2\u0118\u0116\3\2\2\2\u0119\u011a\7$\2\2\u011a\u011b\7$\2"+ + "\2\u011b\u011c\7$\2\2\u011c\u011e\3\2\2\2\u011d\u011f\7$\2\2\u011e\u011d"+ + "\3\2\2\2\u011e\u011f\3\2\2\2\u011f\u0121\3\2\2\2\u0120\u0122\7$\2\2\u0121"+ + "\u0120\3\2\2\2\u0121\u0122\3\2\2\2\u0122\u0124\3\2\2\2\u0123\u0106\3\2"+ + "\2\2\u0123\u010f\3\2\2\2\u0124*\3\2\2\2\u0125\u0127\5\37\17\2\u0126\u0125"+ + "\3\2\2\2\u0127\u0128\3\2\2\2\u0128\u0126\3\2\2\2\u0128\u0129\3\2\2\2\u0129"+ + ",\3\2\2\2\u012a\u012c\5\37\17\2\u012b\u012a\3\2\2\2\u012c\u012d\3\2\2"+ + "\2\u012d\u012b\3\2\2\2\u012d\u012e\3\2\2\2\u012e\u012f\3\2\2\2\u012f\u0133"+ + "\5;\35\2\u0130\u0132\5\37\17\2\u0131\u0130\3\2\2\2\u0132\u0135\3\2\2\2"+ + "\u0133\u0131\3\2\2\2\u0133\u0134\3\2\2\2\u0134\u0155\3\2\2\2\u0135\u0133"+ + "\3\2\2\2\u0136\u0138\5;\35\2\u0137\u0139\5\37\17\2\u0138\u0137\3\2\2\2"+ + "\u0139\u013a\3\2\2\2\u013a\u0138\3\2\2\2\u013a\u013b\3\2\2\2\u013b\u0155"+ + "\3\2\2\2\u013c\u013e\5\37\17\2\u013d\u013c\3\2\2\2\u013e\u013f\3\2\2\2"+ + "\u013f\u013d\3\2\2\2\u013f\u0140\3\2\2\2\u0140\u0148\3\2\2\2\u0141\u0145"+ + "\5;\35\2\u0142\u0144\5\37\17\2\u0143\u0142\3\2\2\2\u0144\u0147\3\2\2\2"+ + "\u0145\u0143\3\2\2\2\u0145\u0146\3\2\2\2\u0146\u0149\3\2\2\2\u0147\u0145"+ + "\3\2\2\2\u0148\u0141\3\2\2\2\u0148\u0149\3\2\2\2\u0149\u014a\3\2\2\2\u014a"+ + "\u014b\5\'\23\2\u014b\u0155\3\2\2\2\u014c\u014e\5;\35\2\u014d\u014f\5"+ + "\37\17\2\u014e\u014d\3\2\2\2\u014f\u0150\3\2\2\2\u0150\u014e\3\2\2\2\u0150"+ + "\u0151\3\2\2\2\u0151\u0152\3\2\2\2\u0152\u0153\5\'\23\2\u0153\u0155\3"+ + "\2\2\2\u0154\u012b\3\2\2\2\u0154\u0136\3\2\2\2\u0154\u013d\3\2\2\2\u0154"+ + "\u014c\3\2\2\2\u0155.\3\2\2\2\u0156\u0157\7d\2\2\u0157\u0158\7{\2\2\u0158"+ + "\60\3\2\2\2\u0159\u015a\7c\2\2\u015a\u015b\7p\2\2\u015b\u015c\7f\2\2\u015c"+ + "\62\3\2\2\2\u015d\u015e\7c\2\2\u015e\u015f\7u\2\2\u015f\u0160\7e\2\2\u0160"+ + "\64\3\2\2\2\u0161\u0162\7?\2\2\u0162\66\3\2\2\2\u0163\u0164\7.\2\2\u0164"+ + "8\3\2\2\2\u0165\u0166\7f\2\2\u0166\u0167\7g\2\2\u0167\u0168\7u\2\2\u0168"+ + "\u0169\7e\2\2\u0169:\3\2\2\2\u016a\u016b\7\60\2\2\u016b<\3\2\2\2\u016c"+ + "\u016d\7h\2\2\u016d\u016e\7c\2\2\u016e\u016f\7n\2\2\u016f\u0170\7u\2\2"+ + "\u0170\u0171\7g\2\2\u0171>\3\2\2\2\u0172\u0173\7h\2\2\u0173\u0174\7k\2"+ + "\2\u0174\u0175\7t\2\2\u0175\u0176\7u\2\2\u0176\u0177\7v\2\2\u0177@\3\2"+ + "\2\2\u0178\u0179\7n\2\2\u0179\u017a\7c\2\2\u017a\u017b\7u\2\2\u017b\u017c"+ + "\7v\2\2\u017cB\3\2\2\2\u017d\u017e\7*\2\2\u017eD\3\2\2\2\u017f\u0180\7"+ + "]\2\2\u0180\u0181\3\2\2\2\u0181\u0182\b\"\6\2\u0182F\3\2\2\2\u0183\u0184"+ + "\7_\2\2\u0184H\3\2\2\2\u0185\u0186\7p\2\2\u0186\u0187\7q\2\2\u0187\u0188"+ + "\7v\2\2\u0188J\3\2\2\2\u0189\u018a\7p\2\2\u018a\u018b\7w\2\2\u018b\u018c"+ + "\7n\2\2\u018c\u018d\7n\2\2\u018dL\3\2\2\2\u018e\u018f\7p\2\2\u018f\u0190"+ + "\7w\2\2\u0190\u0191\7n\2\2\u0191\u0192\7n\2\2\u0192\u0193\7u\2\2\u0193"+ + "N\3\2\2\2\u0194\u0195\7q\2\2\u0195\u0196\7t\2\2\u0196P\3\2\2\2\u0197\u0198"+ + "\7+\2\2\u0198R\3\2\2\2\u0199\u019a\7v\2\2\u019a\u019b\7t\2\2\u019b\u019c"+ + "\7w\2\2\u019c\u019d\7g\2\2\u019dT\3\2\2\2\u019e\u019f\7?\2\2\u019f\u01a0"+ + "\7?\2\2\u01a0V\3\2\2\2\u01a1\u01a2\7#\2\2\u01a2\u01a3\7?\2\2\u01a3X\3"+ + "\2\2\2\u01a4\u01a5\7>\2\2\u01a5Z\3\2\2\2\u01a6\u01a7\7>\2\2\u01a7\u01a8"+ + "\7?\2\2\u01a8\\\3\2\2\2\u01a9\u01aa\7@\2\2\u01aa^\3\2\2\2\u01ab\u01ac"+ + "\7@\2\2\u01ac\u01ad\7?\2\2\u01ad`\3\2\2\2\u01ae\u01af\7-\2\2\u01afb\3"+ + "\2\2\2\u01b0\u01b1\7/\2\2\u01b1d\3\2\2\2\u01b2\u01b3\7,\2\2\u01b3f\3\2"+ + "\2\2\u01b4\u01b5\7\61\2\2\u01b5h\3\2\2\2\u01b6\u01b7\7\'\2\2\u01b7j\3"+ + "\2\2\2\u01b8\u01bb\5!\20\2\u01b9\u01bb\7a\2\2\u01ba\u01b8\3\2\2\2\u01ba"+ + "\u01b9\3\2\2\2\u01bb\u01c1\3\2\2\2\u01bc\u01c0\5!\20\2\u01bd\u01c0\5\37"+ + "\17\2\u01be\u01c0\7a\2\2\u01bf\u01bc\3\2\2\2\u01bf\u01bd\3\2\2\2\u01bf"+ + "\u01be\3\2\2\2\u01c0\u01c3\3\2\2\2\u01c1\u01bf\3\2\2\2\u01c1\u01c2\3\2"+ + "\2\2\u01c2l\3\2\2\2\u01c3\u01c1\3\2\2\2\u01c4\u01ca\7b\2\2\u01c5\u01c9"+ + "\n\n\2\2\u01c6\u01c7\7b\2\2\u01c7\u01c9\7b\2\2\u01c8\u01c5\3\2\2\2\u01c8"+ + "\u01c6\3\2\2\2\u01c9\u01cc\3\2\2\2\u01ca\u01c8\3\2\2\2\u01ca\u01cb\3\2"+ + "\2\2\u01cb\u01cd\3\2\2\2\u01cc\u01ca\3\2\2\2\u01cd\u01ce\7b\2\2\u01ce"+ + "n\3\2\2\2\u01cf\u01d0\5\27\13\2\u01d0\u01d1\3\2\2\2\u01d1\u01d2\b\67\4"+ + "\2\u01d2p\3\2\2\2\u01d3\u01d4\5\31\f\2\u01d4\u01d5\3\2\2\2\u01d5\u01d6"+ + "\b8\4\2\u01d6r\3\2\2\2\u01d7\u01d8\5\33\r\2\u01d8\u01d9\3\2\2\2\u01d9"+ + "\u01da\b9\4\2\u01dat\3\2\2\2\u01db\u01dc\7~\2\2\u01dc\u01dd\3\2\2\2\u01dd"+ + "\u01de\b:\7\2\u01de\u01df\b:\5\2\u01dfv\3\2\2\2\u01e0\u01e1\7_\2\2\u01e1"+ + "\u01e2\3\2\2\2\u01e2\u01e3\b;\b\2\u01e3x\3\2\2\2\u01e4\u01e5\7.\2\2\u01e5"+ + "\u01e6\3\2\2\2\u01e6\u01e7\b<\t\2\u01e7z\3\2\2\2\u01e8\u01ea\n\13\2\2"+ + "\u01e9\u01e8\3\2\2\2\u01ea\u01eb\3\2\2\2\u01eb\u01e9\3\2\2\2\u01eb\u01ec"+ + "\3\2\2\2\u01ec|\3\2\2\2\u01ed\u01ee\5m\66\2\u01ee~\3\2\2\2\u01ef\u01f0"+ + "\5\27\13\2\u01f0\u01f1\3\2\2\2\u01f1\u01f2\b?\4\2\u01f2\u0080\3\2\2\2"+ + "\u01f3\u01f4\5\31\f\2\u01f4\u01f5\3\2\2\2\u01f5\u01f6\b@\4\2\u01f6\u0082"+ + "\3\2\2\2\u01f7\u01f8\5\33\r\2\u01f8\u01f9\3\2\2\2\u01f9\u01fa\bA\4\2\u01fa"+ + "\u0084\3\2\2\2#\2\3\4\u00c5\u00cf\u00d3\u00d6\u00df\u00e1\u00ec\u00ff"+ + "\u0104\u0109\u010b\u0116\u011e\u0121\u0123\u0128\u012d\u0133\u013a\u013f"+ + "\u0145\u0148\u0150\u0154\u01ba\u01bf\u01c1\u01c8\u01ca\u01eb\n\7\3\2\7"+ + "\4\2\2\3\2\6\2\2\7\2\2\t\17\2\t\37\2\t\27\2"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp index 01ce03263019e..db50daa57fbb7 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp @@ -1,6 +1,7 @@ token literal names: null 'eval' +'explain' 'from' 'row' 'stats' @@ -26,6 +27,8 @@ null 'first' 'last' '(' +'[' +null 'not' 'null' 'nulls' @@ -57,6 +60,7 @@ null token symbolic names: null EVAL +EXPLAIN FROM ROW STATS @@ -82,6 +86,8 @@ FALSE FIRST LAST LP +OPENING_BRACKET +CLOSING_BRACKET NOT NULL NULLS @@ -138,7 +144,9 @@ booleanValue number string comparisonOperator +explainCommand +subqueryExpression atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 55, 240, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 66, 10, 3, 12, 3, 14, 3, 69, 11, 3, 3, 4, 3, 4, 5, 4, 73, 10, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 80, 10, 5, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 89, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 97, 10, 7, 12, 7, 14, 7, 100, 11, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 5, 8, 107, 10, 8, 3, 9, 3, 9, 3, 9, 3, 9, 5, 9, 113, 10, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 7, 9, 121, 10, 9, 12, 9, 14, 9, 124, 11, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 7, 10, 137, 10, 10, 12, 10, 14, 10, 140, 11, 10, 5, 10, 142, 10, 10, 3, 10, 3, 10, 5, 10, 146, 10, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 7, 12, 154, 10, 12, 12, 12, 14, 12, 157, 11, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 164, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 7, 14, 170, 10, 14, 12, 14, 14, 14, 173, 11, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 182, 10, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 7, 18, 189, 10, 18, 12, 18, 14, 18, 192, 11, 18, 3, 19, 3, 19, 3, 19, 7, 19, 197, 10, 19, 12, 19, 14, 19, 200, 11, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 208, 10, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 7, 23, 217, 10, 23, 12, 23, 14, 23, 220, 11, 23, 3, 24, 3, 24, 5, 24, 224, 10, 24, 3, 24, 3, 24, 5, 24, 228, 10, 24, 3, 25, 3, 25, 3, 26, 3, 26, 5, 26, 234, 10, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 2, 5, 4, 12, 16, 29, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 2, 10, 3, 2, 41, 42, 3, 2, 43, 45, 3, 2, 51, 52, 3, 2, 46, 47, 4, 2, 20, 20, 23, 23, 3, 2, 26, 27, 4, 2, 25, 25, 34, 34, 3, 2, 35, 40, 2, 243, 2, 56, 3, 2, 2, 2, 4, 59, 3, 2, 2, 2, 6, 72, 3, 2, 2, 2, 8, 79, 3, 2, 2, 2, 10, 81, 3, 2, 2, 2, 12, 88, 3, 2, 2, 2, 14, 106, 3, 2, 2, 2, 16, 112, 3, 2, 2, 2, 18, 145, 3, 2, 2, 2, 20, 147, 3, 2, 2, 2, 22, 150, 3, 2, 2, 2, 24, 163, 3, 2, 2, 2, 26, 165, 3, 2, 2, 2, 28, 174, 3, 2, 2, 2, 30, 177, 3, 2, 2, 2, 32, 183, 3, 2, 2, 2, 34, 185, 3, 2, 2, 2, 36, 193, 3, 2, 2, 2, 38, 201, 3, 2, 2, 2, 40, 207, 3, 2, 2, 2, 42, 209, 3, 2, 2, 2, 44, 212, 3, 2, 2, 2, 46, 221, 3, 2, 2, 2, 48, 229, 3, 2, 2, 2, 50, 233, 3, 2, 2, 2, 52, 235, 3, 2, 2, 2, 54, 237, 3, 2, 2, 2, 56, 57, 5, 4, 3, 2, 57, 58, 7, 2, 2, 3, 58, 3, 3, 2, 2, 2, 59, 60, 8, 3, 1, 2, 60, 61, 5, 6, 4, 2, 61, 67, 3, 2, 2, 2, 62, 63, 12, 3, 2, 2, 63, 64, 7, 14, 2, 2, 64, 66, 5, 8, 5, 2, 65, 62, 3, 2, 2, 2, 66, 69, 3, 2, 2, 2, 67, 65, 3, 2, 2, 2, 67, 68, 3, 2, 2, 2, 68, 5, 3, 2, 2, 2, 69, 67, 3, 2, 2, 2, 70, 73, 5, 20, 11, 2, 71, 73, 5, 26, 14, 2, 72, 70, 3, 2, 2, 2, 72, 71, 3, 2, 2, 2, 73, 7, 3, 2, 2, 2, 74, 80, 5, 28, 15, 2, 75, 80, 5, 42, 22, 2, 76, 80, 5, 44, 23, 2, 77, 80, 5, 30, 16, 2, 78, 80, 5, 10, 6, 2, 79, 74, 3, 2, 2, 2, 79, 75, 3, 2, 2, 2, 79, 76, 3, 2, 2, 2, 79, 77, 3, 2, 2, 2, 79, 78, 3, 2, 2, 2, 80, 9, 3, 2, 2, 2, 81, 82, 7, 7, 2, 2, 82, 83, 5, 12, 7, 2, 83, 11, 3, 2, 2, 2, 84, 85, 8, 7, 1, 2, 85, 86, 7, 29, 2, 2, 86, 89, 5, 12, 7, 6, 87, 89, 5, 14, 8, 2, 88, 84, 3, 2, 2, 2, 88, 87, 3, 2, 2, 2, 89, 98, 3, 2, 2, 2, 90, 91, 12, 4, 2, 2, 91, 92, 7, 19, 2, 2, 92, 97, 5, 12, 7, 5, 93, 94, 12, 3, 2, 2, 94, 95, 7, 32, 2, 2, 95, 97, 5, 12, 7, 4, 96, 90, 3, 2, 2, 2, 96, 93, 3, 2, 2, 2, 97, 100, 3, 2, 2, 2, 98, 96, 3, 2, 2, 2, 98, 99, 3, 2, 2, 2, 99, 13, 3, 2, 2, 2, 100, 98, 3, 2, 2, 2, 101, 107, 5, 16, 9, 2, 102, 103, 5, 16, 9, 2, 103, 104, 5, 54, 28, 2, 104, 105, 5, 16, 9, 2, 105, 107, 3, 2, 2, 2, 106, 101, 3, 2, 2, 2, 106, 102, 3, 2, 2, 2, 107, 15, 3, 2, 2, 2, 108, 109, 8, 9, 1, 2, 109, 113, 5, 18, 10, 2, 110, 111, 9, 2, 2, 2, 111, 113, 5, 16, 9, 5, 112, 108, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 113, 122, 3, 2, 2, 2, 114, 115, 12, 4, 2, 2, 115, 116, 9, 3, 2, 2, 116, 121, 5, 16, 9, 5, 117, 118, 12, 3, 2, 2, 118, 119, 9, 2, 2, 2, 119, 121, 5, 16, 9, 4, 120, 114, 3, 2, 2, 2, 120, 117, 3, 2, 2, 2, 121, 124, 3, 2, 2, 2, 122, 120, 3, 2, 2, 2, 122, 123, 3, 2, 2, 2, 123, 17, 3, 2, 2, 2, 124, 122, 3, 2, 2, 2, 125, 146, 5, 40, 21, 2, 126, 146, 5, 34, 18, 2, 127, 128, 7, 28, 2, 2, 128, 129, 5, 12, 7, 2, 129, 130, 7, 33, 2, 2, 130, 146, 3, 2, 2, 2, 131, 132, 5, 38, 20, 2, 132, 141, 7, 28, 2, 2, 133, 138, 5, 12, 7, 2, 134, 135, 7, 22, 2, 2, 135, 137, 5, 12, 7, 2, 136, 134, 3, 2, 2, 2, 137, 140, 3, 2, 2, 2, 138, 136, 3, 2, 2, 2, 138, 139, 3, 2, 2, 2, 139, 142, 3, 2, 2, 2, 140, 138, 3, 2, 2, 2, 141, 133, 3, 2, 2, 2, 141, 142, 3, 2, 2, 2, 142, 143, 3, 2, 2, 2, 143, 144, 7, 33, 2, 2, 144, 146, 3, 2, 2, 2, 145, 125, 3, 2, 2, 2, 145, 126, 3, 2, 2, 2, 145, 127, 3, 2, 2, 2, 145, 131, 3, 2, 2, 2, 146, 19, 3, 2, 2, 2, 147, 148, 7, 5, 2, 2, 148, 149, 5, 22, 12, 2, 149, 21, 3, 2, 2, 2, 150, 155, 5, 24, 13, 2, 151, 152, 7, 22, 2, 2, 152, 154, 5, 24, 13, 2, 153, 151, 3, 2, 2, 2, 154, 157, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 155, 156, 3, 2, 2, 2, 156, 23, 3, 2, 2, 2, 157, 155, 3, 2, 2, 2, 158, 164, 5, 12, 7, 2, 159, 160, 5, 34, 18, 2, 160, 161, 7, 21, 2, 2, 161, 162, 5, 12, 7, 2, 162, 164, 3, 2, 2, 2, 163, 158, 3, 2, 2, 2, 163, 159, 3, 2, 2, 2, 164, 25, 3, 2, 2, 2, 165, 166, 7, 4, 2, 2, 166, 171, 5, 32, 17, 2, 167, 168, 7, 22, 2, 2, 168, 170, 5, 32, 17, 2, 169, 167, 3, 2, 2, 2, 170, 173, 3, 2, 2, 2, 171, 169, 3, 2, 2, 2, 171, 172, 3, 2, 2, 2, 172, 27, 3, 2, 2, 2, 173, 171, 3, 2, 2, 2, 174, 175, 7, 3, 2, 2, 175, 176, 5, 22, 12, 2, 176, 29, 3, 2, 2, 2, 177, 178, 7, 6, 2, 2, 178, 181, 5, 22, 12, 2, 179, 180, 7, 18, 2, 2, 180, 182, 5, 36, 19, 2, 181, 179, 3, 2, 2, 2, 181, 182, 3, 2, 2, 2, 182, 31, 3, 2, 2, 2, 183, 184, 9, 4, 2, 2, 184, 33, 3, 2, 2, 2, 185, 190, 5, 38, 20, 2, 186, 187, 7, 24, 2, 2, 187, 189, 5, 38, 20, 2, 188, 186, 3, 2, 2, 2, 189, 192, 3, 2, 2, 2, 190, 188, 3, 2, 2, 2, 190, 191, 3, 2, 2, 2, 191, 35, 3, 2, 2, 2, 192, 190, 3, 2, 2, 2, 193, 198, 5, 34, 18, 2, 194, 195, 7, 22, 2, 2, 195, 197, 5, 34, 18, 2, 196, 194, 3, 2, 2, 2, 197, 200, 3, 2, 2, 2, 198, 196, 3, 2, 2, 2, 198, 199, 3, 2, 2, 2, 199, 37, 3, 2, 2, 2, 200, 198, 3, 2, 2, 2, 201, 202, 9, 5, 2, 2, 202, 39, 3, 2, 2, 2, 203, 208, 7, 30, 2, 2, 204, 208, 5, 50, 26, 2, 205, 208, 5, 48, 25, 2, 206, 208, 5, 52, 27, 2, 207, 203, 3, 2, 2, 2, 207, 204, 3, 2, 2, 2, 207, 205, 3, 2, 2, 2, 207, 206, 3, 2, 2, 2, 208, 41, 3, 2, 2, 2, 209, 210, 7, 9, 2, 2, 210, 211, 7, 16, 2, 2, 211, 43, 3, 2, 2, 2, 212, 213, 7, 8, 2, 2, 213, 218, 5, 46, 24, 2, 214, 215, 7, 22, 2, 2, 215, 217, 5, 46, 24, 2, 216, 214, 3, 2, 2, 2, 217, 220, 3, 2, 2, 2, 218, 216, 3, 2, 2, 2, 218, 219, 3, 2, 2, 2, 219, 45, 3, 2, 2, 2, 220, 218, 3, 2, 2, 2, 221, 223, 5, 12, 7, 2, 222, 224, 9, 6, 2, 2, 223, 222, 3, 2, 2, 2, 223, 224, 3, 2, 2, 2, 224, 227, 3, 2, 2, 2, 225, 226, 7, 31, 2, 2, 226, 228, 9, 7, 2, 2, 227, 225, 3, 2, 2, 2, 227, 228, 3, 2, 2, 2, 228, 47, 3, 2, 2, 2, 229, 230, 9, 8, 2, 2, 230, 49, 3, 2, 2, 2, 231, 234, 7, 17, 2, 2, 232, 234, 7, 16, 2, 2, 233, 231, 3, 2, 2, 2, 233, 232, 3, 2, 2, 2, 234, 51, 3, 2, 2, 2, 235, 236, 7, 15, 2, 2, 236, 53, 3, 2, 2, 2, 237, 238, 9, 9, 2, 2, 238, 55, 3, 2, 2, 2, 26, 67, 72, 79, 88, 96, 98, 106, 112, 120, 122, 138, 141, 145, 155, 163, 171, 181, 190, 198, 207, 218, 223, 227, 233] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 58, 252, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 70, 10, 3, 12, 3, 14, 3, 73, 11, 3, 3, 4, 3, 4, 3, 4, 5, 4, 78, 10, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 85, 10, 5, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 94, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 102, 10, 7, 12, 7, 14, 7, 105, 11, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 5, 8, 112, 10, 8, 3, 9, 3, 9, 3, 9, 3, 9, 5, 9, 118, 10, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 7, 9, 126, 10, 9, 12, 9, 14, 9, 129, 11, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 7, 10, 142, 10, 10, 12, 10, 14, 10, 145, 11, 10, 5, 10, 147, 10, 10, 3, 10, 3, 10, 5, 10, 151, 10, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 7, 12, 159, 10, 12, 12, 12, 14, 12, 162, 11, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 169, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 7, 14, 175, 10, 14, 12, 14, 14, 14, 178, 11, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 187, 10, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 7, 18, 194, 10, 18, 12, 18, 14, 18, 197, 11, 18, 3, 19, 3, 19, 3, 19, 7, 19, 202, 10, 19, 12, 19, 14, 19, 205, 11, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 213, 10, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 7, 23, 222, 10, 23, 12, 23, 14, 23, 225, 11, 23, 3, 24, 3, 24, 5, 24, 229, 10, 24, 3, 24, 3, 24, 5, 24, 233, 10, 24, 3, 25, 3, 25, 3, 26, 3, 26, 5, 26, 239, 10, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 2, 5, 4, 12, 16, 31, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 2, 10, 3, 2, 44, 45, 3, 2, 46, 48, 3, 2, 54, 55, 3, 2, 49, 50, 4, 2, 21, 21, 24, 24, 3, 2, 27, 28, 4, 2, 26, 26, 37, 37, 3, 2, 38, 43, 2, 254, 2, 60, 3, 2, 2, 2, 4, 63, 3, 2, 2, 2, 6, 77, 3, 2, 2, 2, 8, 84, 3, 2, 2, 2, 10, 86, 3, 2, 2, 2, 12, 93, 3, 2, 2, 2, 14, 111, 3, 2, 2, 2, 16, 117, 3, 2, 2, 2, 18, 150, 3, 2, 2, 2, 20, 152, 3, 2, 2, 2, 22, 155, 3, 2, 2, 2, 24, 168, 3, 2, 2, 2, 26, 170, 3, 2, 2, 2, 28, 179, 3, 2, 2, 2, 30, 182, 3, 2, 2, 2, 32, 188, 3, 2, 2, 2, 34, 190, 3, 2, 2, 2, 36, 198, 3, 2, 2, 2, 38, 206, 3, 2, 2, 2, 40, 212, 3, 2, 2, 2, 42, 214, 3, 2, 2, 2, 44, 217, 3, 2, 2, 2, 46, 226, 3, 2, 2, 2, 48, 234, 3, 2, 2, 2, 50, 238, 3, 2, 2, 2, 52, 240, 3, 2, 2, 2, 54, 242, 3, 2, 2, 2, 56, 244, 3, 2, 2, 2, 58, 247, 3, 2, 2, 2, 60, 61, 5, 4, 3, 2, 61, 62, 7, 2, 2, 3, 62, 3, 3, 2, 2, 2, 63, 64, 8, 3, 1, 2, 64, 65, 5, 6, 4, 2, 65, 71, 3, 2, 2, 2, 66, 67, 12, 3, 2, 2, 67, 68, 7, 15, 2, 2, 68, 70, 5, 8, 5, 2, 69, 66, 3, 2, 2, 2, 70, 73, 3, 2, 2, 2, 71, 69, 3, 2, 2, 2, 71, 72, 3, 2, 2, 2, 72, 5, 3, 2, 2, 2, 73, 71, 3, 2, 2, 2, 74, 78, 5, 56, 29, 2, 75, 78, 5, 26, 14, 2, 76, 78, 5, 20, 11, 2, 77, 74, 3, 2, 2, 2, 77, 75, 3, 2, 2, 2, 77, 76, 3, 2, 2, 2, 78, 7, 3, 2, 2, 2, 79, 85, 5, 28, 15, 2, 80, 85, 5, 42, 22, 2, 81, 85, 5, 44, 23, 2, 82, 85, 5, 30, 16, 2, 83, 85, 5, 10, 6, 2, 84, 79, 3, 2, 2, 2, 84, 80, 3, 2, 2, 2, 84, 81, 3, 2, 2, 2, 84, 82, 3, 2, 2, 2, 84, 83, 3, 2, 2, 2, 85, 9, 3, 2, 2, 2, 86, 87, 7, 8, 2, 2, 87, 88, 5, 12, 7, 2, 88, 11, 3, 2, 2, 2, 89, 90, 8, 7, 1, 2, 90, 91, 7, 32, 2, 2, 91, 94, 5, 12, 7, 6, 92, 94, 5, 14, 8, 2, 93, 89, 3, 2, 2, 2, 93, 92, 3, 2, 2, 2, 94, 103, 3, 2, 2, 2, 95, 96, 12, 4, 2, 2, 96, 97, 7, 20, 2, 2, 97, 102, 5, 12, 7, 5, 98, 99, 12, 3, 2, 2, 99, 100, 7, 35, 2, 2, 100, 102, 5, 12, 7, 4, 101, 95, 3, 2, 2, 2, 101, 98, 3, 2, 2, 2, 102, 105, 3, 2, 2, 2, 103, 101, 3, 2, 2, 2, 103, 104, 3, 2, 2, 2, 104, 13, 3, 2, 2, 2, 105, 103, 3, 2, 2, 2, 106, 112, 5, 16, 9, 2, 107, 108, 5, 16, 9, 2, 108, 109, 5, 54, 28, 2, 109, 110, 5, 16, 9, 2, 110, 112, 3, 2, 2, 2, 111, 106, 3, 2, 2, 2, 111, 107, 3, 2, 2, 2, 112, 15, 3, 2, 2, 2, 113, 114, 8, 9, 1, 2, 114, 118, 5, 18, 10, 2, 115, 116, 9, 2, 2, 2, 116, 118, 5, 16, 9, 5, 117, 113, 3, 2, 2, 2, 117, 115, 3, 2, 2, 2, 118, 127, 3, 2, 2, 2, 119, 120, 12, 4, 2, 2, 120, 121, 9, 3, 2, 2, 121, 126, 5, 16, 9, 5, 122, 123, 12, 3, 2, 2, 123, 124, 9, 2, 2, 2, 124, 126, 5, 16, 9, 4, 125, 119, 3, 2, 2, 2, 125, 122, 3, 2, 2, 2, 126, 129, 3, 2, 2, 2, 127, 125, 3, 2, 2, 2, 127, 128, 3, 2, 2, 2, 128, 17, 3, 2, 2, 2, 129, 127, 3, 2, 2, 2, 130, 151, 5, 40, 21, 2, 131, 151, 5, 34, 18, 2, 132, 133, 7, 29, 2, 2, 133, 134, 5, 12, 7, 2, 134, 135, 7, 36, 2, 2, 135, 151, 3, 2, 2, 2, 136, 137, 5, 38, 20, 2, 137, 146, 7, 29, 2, 2, 138, 143, 5, 12, 7, 2, 139, 140, 7, 23, 2, 2, 140, 142, 5, 12, 7, 2, 141, 139, 3, 2, 2, 2, 142, 145, 3, 2, 2, 2, 143, 141, 3, 2, 2, 2, 143, 144, 3, 2, 2, 2, 144, 147, 3, 2, 2, 2, 145, 143, 3, 2, 2, 2, 146, 138, 3, 2, 2, 2, 146, 147, 3, 2, 2, 2, 147, 148, 3, 2, 2, 2, 148, 149, 7, 36, 2, 2, 149, 151, 3, 2, 2, 2, 150, 130, 3, 2, 2, 2, 150, 131, 3, 2, 2, 2, 150, 132, 3, 2, 2, 2, 150, 136, 3, 2, 2, 2, 151, 19, 3, 2, 2, 2, 152, 153, 7, 6, 2, 2, 153, 154, 5, 22, 12, 2, 154, 21, 3, 2, 2, 2, 155, 160, 5, 24, 13, 2, 156, 157, 7, 23, 2, 2, 157, 159, 5, 24, 13, 2, 158, 156, 3, 2, 2, 2, 159, 162, 3, 2, 2, 2, 160, 158, 3, 2, 2, 2, 160, 161, 3, 2, 2, 2, 161, 23, 3, 2, 2, 2, 162, 160, 3, 2, 2, 2, 163, 169, 5, 12, 7, 2, 164, 165, 5, 34, 18, 2, 165, 166, 7, 22, 2, 2, 166, 167, 5, 12, 7, 2, 167, 169, 3, 2, 2, 2, 168, 163, 3, 2, 2, 2, 168, 164, 3, 2, 2, 2, 169, 25, 3, 2, 2, 2, 170, 171, 7, 5, 2, 2, 171, 176, 5, 32, 17, 2, 172, 173, 7, 23, 2, 2, 173, 175, 5, 32, 17, 2, 174, 172, 3, 2, 2, 2, 175, 178, 3, 2, 2, 2, 176, 174, 3, 2, 2, 2, 176, 177, 3, 2, 2, 2, 177, 27, 3, 2, 2, 2, 178, 176, 3, 2, 2, 2, 179, 180, 7, 3, 2, 2, 180, 181, 5, 22, 12, 2, 181, 29, 3, 2, 2, 2, 182, 183, 7, 7, 2, 2, 183, 186, 5, 22, 12, 2, 184, 185, 7, 19, 2, 2, 185, 187, 5, 36, 19, 2, 186, 184, 3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 31, 3, 2, 2, 2, 188, 189, 9, 4, 2, 2, 189, 33, 3, 2, 2, 2, 190, 195, 5, 38, 20, 2, 191, 192, 7, 25, 2, 2, 192, 194, 5, 38, 20, 2, 193, 191, 3, 2, 2, 2, 194, 197, 3, 2, 2, 2, 195, 193, 3, 2, 2, 2, 195, 196, 3, 2, 2, 2, 196, 35, 3, 2, 2, 2, 197, 195, 3, 2, 2, 2, 198, 203, 5, 34, 18, 2, 199, 200, 7, 23, 2, 2, 200, 202, 5, 34, 18, 2, 201, 199, 3, 2, 2, 2, 202, 205, 3, 2, 2, 2, 203, 201, 3, 2, 2, 2, 203, 204, 3, 2, 2, 2, 204, 37, 3, 2, 2, 2, 205, 203, 3, 2, 2, 2, 206, 207, 9, 5, 2, 2, 207, 39, 3, 2, 2, 2, 208, 213, 7, 33, 2, 2, 209, 213, 5, 50, 26, 2, 210, 213, 5, 48, 25, 2, 211, 213, 5, 52, 27, 2, 212, 208, 3, 2, 2, 2, 212, 209, 3, 2, 2, 2, 212, 210, 3, 2, 2, 2, 212, 211, 3, 2, 2, 2, 213, 41, 3, 2, 2, 2, 214, 215, 7, 10, 2, 2, 215, 216, 7, 17, 2, 2, 216, 43, 3, 2, 2, 2, 217, 218, 7, 9, 2, 2, 218, 223, 5, 46, 24, 2, 219, 220, 7, 23, 2, 2, 220, 222, 5, 46, 24, 2, 221, 219, 3, 2, 2, 2, 222, 225, 3, 2, 2, 2, 223, 221, 3, 2, 2, 2, 223, 224, 3, 2, 2, 2, 224, 45, 3, 2, 2, 2, 225, 223, 3, 2, 2, 2, 226, 228, 5, 12, 7, 2, 227, 229, 9, 6, 2, 2, 228, 227, 3, 2, 2, 2, 228, 229, 3, 2, 2, 2, 229, 232, 3, 2, 2, 2, 230, 231, 7, 34, 2, 2, 231, 233, 9, 7, 2, 2, 232, 230, 3, 2, 2, 2, 232, 233, 3, 2, 2, 2, 233, 47, 3, 2, 2, 2, 234, 235, 9, 8, 2, 2, 235, 49, 3, 2, 2, 2, 236, 239, 7, 18, 2, 2, 237, 239, 7, 17, 2, 2, 238, 236, 3, 2, 2, 2, 238, 237, 3, 2, 2, 2, 239, 51, 3, 2, 2, 2, 240, 241, 7, 16, 2, 2, 241, 53, 3, 2, 2, 2, 242, 243, 9, 9, 2, 2, 243, 55, 3, 2, 2, 2, 244, 245, 7, 4, 2, 2, 245, 246, 5, 58, 30, 2, 246, 57, 3, 2, 2, 2, 247, 248, 7, 30, 2, 2, 248, 249, 5, 4, 3, 2, 249, 250, 7, 31, 2, 2, 250, 59, 3, 2, 2, 2, 26, 71, 77, 84, 93, 101, 103, 111, 117, 125, 127, 143, 146, 150, 160, 168, 176, 186, 195, 203, 212, 223, 228, 232, 238] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java index 24002fa74aa21..e034ac4f6a87f 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java @@ -17,15 +17,15 @@ public class EsqlBaseParser extends Parser { protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int - EVAL=1, FROM=2, ROW=3, STATS=4, WHERE=5, SORT=6, LIMIT=7, UNKNOWN_COMMAND=8, - LINE_COMMENT=9, MULTILINE_COMMENT=10, WS=11, PIPE=12, STRING=13, INTEGER_LITERAL=14, - DECIMAL_LITERAL=15, BY=16, AND=17, ASC=18, ASSIGN=19, COMMA=20, DESC=21, - DOT=22, FALSE=23, FIRST=24, LAST=25, LP=26, NOT=27, NULL=28, NULLS=29, - OR=30, RP=31, TRUE=32, EQ=33, NEQ=34, LT=35, LTE=36, GT=37, GTE=38, PLUS=39, - MINUS=40, ASTERISK=41, SLASH=42, PERCENT=43, UNQUOTED_IDENTIFIER=44, QUOTED_IDENTIFIER=45, - EXPR_LINE_COMMENT=46, EXPR_MULTILINE_COMMENT=47, EXPR_WS=48, SRC_UNQUOTED_IDENTIFIER=49, - SRC_QUOTED_IDENTIFIER=50, SRC_LINE_COMMENT=51, SRC_MULTILINE_COMMENT=52, - SRC_WS=53; + EVAL=1, EXPLAIN=2, FROM=3, ROW=4, STATS=5, WHERE=6, SORT=7, LIMIT=8, UNKNOWN_COMMAND=9, + LINE_COMMENT=10, MULTILINE_COMMENT=11, WS=12, PIPE=13, STRING=14, INTEGER_LITERAL=15, + DECIMAL_LITERAL=16, BY=17, AND=18, ASC=19, ASSIGN=20, COMMA=21, DESC=22, + DOT=23, FALSE=24, FIRST=25, LAST=26, LP=27, OPENING_BRACKET=28, CLOSING_BRACKET=29, + NOT=30, NULL=31, NULLS=32, OR=33, RP=34, TRUE=35, EQ=36, NEQ=37, LT=38, + LTE=39, GT=40, GTE=41, PLUS=42, MINUS=43, ASTERISK=44, SLASH=45, PERCENT=46, + UNQUOTED_IDENTIFIER=47, QUOTED_IDENTIFIER=48, EXPR_LINE_COMMENT=49, EXPR_MULTILINE_COMMENT=50, + EXPR_WS=51, SRC_UNQUOTED_IDENTIFIER=52, SRC_QUOTED_IDENTIFIER=53, SRC_LINE_COMMENT=54, + SRC_MULTILINE_COMMENT=55, SRC_WS=56; public static final int RULE_singleStatement = 0, RULE_query = 1, RULE_sourceCommand = 2, RULE_processingCommand = 3, RULE_whereCommand = 4, RULE_booleanExpression = 5, RULE_valueExpression = 6, @@ -34,7 +34,8 @@ public class EsqlBaseParser extends Parser { RULE_statsCommand = 14, RULE_sourceIdentifier = 15, RULE_qualifiedName = 16, RULE_qualifiedNames = 17, RULE_identifier = 18, RULE_constant = 19, RULE_limitCommand = 20, RULE_sortCommand = 21, RULE_orderExpression = 22, RULE_booleanValue = 23, - RULE_number = 24, RULE_string = 25, RULE_comparisonOperator = 26; + RULE_number = 24, RULE_string = 25, RULE_comparisonOperator = 26, RULE_explainCommand = 27, + RULE_subqueryExpression = 28; private static String[] makeRuleNames() { return new String[] { "singleStatement", "query", "sourceCommand", "processingCommand", "whereCommand", @@ -42,28 +43,30 @@ private static String[] makeRuleNames() { "rowCommand", "fields", "field", "fromCommand", "evalCommand", "statsCommand", "sourceIdentifier", "qualifiedName", "qualifiedNames", "identifier", "constant", "limitCommand", "sortCommand", "orderExpression", "booleanValue", - "number", "string", "comparisonOperator" + "number", "string", "comparisonOperator", "explainCommand", "subqueryExpression" }; } public static final String[] ruleNames = makeRuleNames(); private static String[] makeLiteralNames() { return new String[] { - null, "'eval'", "'from'", "'row'", "'stats'", "'where'", "'sort'", "'limit'", - null, null, null, null, null, null, null, null, "'by'", "'and'", "'asc'", - "'='", null, "'desc'", "'.'", "'false'", "'first'", "'last'", "'('", - "'not'", "'null'", "'nulls'", "'or'", "')'", "'true'", "'=='", "'!='", - "'<'", "'<='", "'>'", "'>='", "'+'", "'-'", "'*'", "'/'", "'%'" + null, "'eval'", "'explain'", "'from'", "'row'", "'stats'", "'where'", + "'sort'", "'limit'", null, null, null, null, null, null, null, null, + "'by'", "'and'", "'asc'", "'='", null, "'desc'", "'.'", "'false'", "'first'", + "'last'", "'('", "'['", null, "'not'", "'null'", "'nulls'", "'or'", "')'", + "'true'", "'=='", "'!='", "'<'", "'<='", "'>'", "'>='", "'+'", "'-'", + "'*'", "'/'", "'%'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); private static String[] makeSymbolicNames() { return new String[] { - null, "EVAL", "FROM", "ROW", "STATS", "WHERE", "SORT", "LIMIT", "UNKNOWN_COMMAND", - "LINE_COMMENT", "MULTILINE_COMMENT", "WS", "PIPE", "STRING", "INTEGER_LITERAL", - "DECIMAL_LITERAL", "BY", "AND", "ASC", "ASSIGN", "COMMA", "DESC", "DOT", - "FALSE", "FIRST", "LAST", "LP", "NOT", "NULL", "NULLS", "OR", "RP", "TRUE", - "EQ", "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", + null, "EVAL", "EXPLAIN", "FROM", "ROW", "STATS", "WHERE", "SORT", "LIMIT", + "UNKNOWN_COMMAND", "LINE_COMMENT", "MULTILINE_COMMENT", "WS", "PIPE", + "STRING", "INTEGER_LITERAL", "DECIMAL_LITERAL", "BY", "AND", "ASC", "ASSIGN", + "COMMA", "DESC", "DOT", "FALSE", "FIRST", "LAST", "LP", "OPENING_BRACKET", + "CLOSING_BRACKET", "NOT", "NULL", "NULLS", "OR", "RP", "TRUE", "EQ", + "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", "UNQUOTED_IDENTIFIER", "QUOTED_IDENTIFIER", "EXPR_LINE_COMMENT", "EXPR_MULTILINE_COMMENT", "EXPR_WS", "SRC_UNQUOTED_IDENTIFIER", "SRC_QUOTED_IDENTIFIER", "SRC_LINE_COMMENT", "SRC_MULTILINE_COMMENT", "SRC_WS" @@ -150,9 +153,9 @@ public final SingleStatementContext singleStatement() throws RecognitionExceptio try { enterOuterAlt(_localctx, 1); { - setState(54); + setState(58); query(0); - setState(55); + setState(59); match(EOF); } } @@ -241,11 +244,11 @@ private QueryContext query(int _p) throws RecognitionException { _ctx = _localctx; _prevctx = _localctx; - setState(58); + setState(62); sourceCommand(); } _ctx.stop = _input.LT(-1); - setState(65); + setState(69); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,0,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { @@ -256,16 +259,16 @@ private QueryContext query(int _p) throws RecognitionException { { _localctx = new CompositeQueryContext(new QueryContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_query); - setState(60); + setState(64); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(61); + setState(65); match(PIPE); - setState(62); + setState(66); processingCommand(); } } } - setState(67); + setState(71); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,0,_ctx); } @@ -283,12 +286,15 @@ private QueryContext query(int _p) throws RecognitionException { } public static class SourceCommandContext extends ParserRuleContext { - public RowCommandContext rowCommand() { - return getRuleContext(RowCommandContext.class,0); + public ExplainCommandContext explainCommand() { + return getRuleContext(ExplainCommandContext.class,0); } public FromCommandContext fromCommand() { return getRuleContext(FromCommandContext.class,0); } + public RowCommandContext rowCommand() { + return getRuleContext(RowCommandContext.class,0); + } public SourceCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -312,23 +318,30 @@ public final SourceCommandContext sourceCommand() throws RecognitionException { SourceCommandContext _localctx = new SourceCommandContext(_ctx, getState()); enterRule(_localctx, 4, RULE_sourceCommand); try { - setState(70); + setState(75); _errHandler.sync(this); switch (_input.LA(1)) { - case ROW: + case EXPLAIN: enterOuterAlt(_localctx, 1); { - setState(68); - rowCommand(); + setState(72); + explainCommand(); } break; case FROM: enterOuterAlt(_localctx, 2); { - setState(69); + setState(73); fromCommand(); } break; + case ROW: + enterOuterAlt(_localctx, 3); + { + setState(74); + rowCommand(); + } + break; default: throw new NoViableAltException(this); } @@ -383,41 +396,41 @@ public final ProcessingCommandContext processingCommand() throws RecognitionExce ProcessingCommandContext _localctx = new ProcessingCommandContext(_ctx, getState()); enterRule(_localctx, 6, RULE_processingCommand); try { - setState(77); + setState(82); _errHandler.sync(this); switch (_input.LA(1)) { case EVAL: enterOuterAlt(_localctx, 1); { - setState(72); + setState(77); evalCommand(); } break; case LIMIT: enterOuterAlt(_localctx, 2); { - setState(73); + setState(78); limitCommand(); } break; case SORT: enterOuterAlt(_localctx, 3); { - setState(74); + setState(79); sortCommand(); } break; case STATS: enterOuterAlt(_localctx, 4); { - setState(75); + setState(80); statsCommand(); } break; case WHERE: enterOuterAlt(_localctx, 5); { - setState(76); + setState(81); whereCommand(); } break; @@ -466,9 +479,9 @@ public final WhereCommandContext whereCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(79); + setState(84); match(WHERE); - setState(80); + setState(85); booleanExpression(0); } } @@ -576,7 +589,7 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc int _alt; enterOuterAlt(_localctx, 1); { - setState(86); + setState(91); _errHandler.sync(this); switch (_input.LA(1)) { case NOT: @@ -585,9 +598,9 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _ctx = _localctx; _prevctx = _localctx; - setState(83); + setState(88); match(NOT); - setState(84); + setState(89); booleanExpression(4); } break; @@ -606,7 +619,7 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new BooleanDefaultContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(85); + setState(90); valueExpression(); } break; @@ -614,7 +627,7 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); - setState(96); + setState(101); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,5,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { @@ -622,7 +635,7 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(94); + setState(99); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { case 1: @@ -630,11 +643,11 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new LogicalBinaryContext(new BooleanExpressionContext(_parentctx, _parentState)); ((LogicalBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression); - setState(88); + setState(93); if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(89); + setState(94); ((LogicalBinaryContext)_localctx).operator = match(AND); - setState(90); + setState(95); ((LogicalBinaryContext)_localctx).right = booleanExpression(3); } break; @@ -643,18 +656,18 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new LogicalBinaryContext(new BooleanExpressionContext(_parentctx, _parentState)); ((LogicalBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression); - setState(91); + setState(96); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(92); + setState(97); ((LogicalBinaryContext)_localctx).operator = match(OR); - setState(93); + setState(98); ((LogicalBinaryContext)_localctx).right = booleanExpression(2); } break; } } } - setState(98); + setState(103); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,5,_ctx); } @@ -733,14 +746,14 @@ public final ValueExpressionContext valueExpression() throws RecognitionExceptio ValueExpressionContext _localctx = new ValueExpressionContext(_ctx, getState()); enterRule(_localctx, 12, RULE_valueExpression); try { - setState(104); + setState(109); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) { case 1: _localctx = new ValueExpressionDefaultContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(99); + setState(104); operatorExpression(0); } break; @@ -748,11 +761,11 @@ public final ValueExpressionContext valueExpression() throws RecognitionExceptio _localctx = new ComparisonContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(100); + setState(105); ((ComparisonContext)_localctx).left = operatorExpression(0); - setState(101); + setState(106); comparisonOperator(); - setState(102); + setState(107); ((ComparisonContext)_localctx).right = operatorExpression(0); } break; @@ -868,7 +881,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE int _alt; enterOuterAlt(_localctx, 1); { - setState(110); + setState(115); _errHandler.sync(this); switch (_input.LA(1)) { case STRING: @@ -885,7 +898,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _ctx = _localctx; _prevctx = _localctx; - setState(107); + setState(112); primaryExpression(); } break; @@ -895,7 +908,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _localctx = new ArithmeticUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(108); + setState(113); ((ArithmeticUnaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { @@ -906,7 +919,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _errHandler.reportMatch(this); consume(); } - setState(109); + setState(114); operatorExpression(3); } break; @@ -914,7 +927,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); - setState(120); + setState(125); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,9,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { @@ -922,7 +935,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(118); + setState(123); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { case 1: @@ -930,9 +943,9 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _localctx = new ArithmeticBinaryContext(new OperatorExpressionContext(_parentctx, _parentState)); ((ArithmeticBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_operatorExpression); - setState(112); + setState(117); if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(113); + setState(118); ((ArithmeticBinaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ASTERISK) | (1L << SLASH) | (1L << PERCENT))) != 0)) ) { @@ -943,7 +956,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _errHandler.reportMatch(this); consume(); } - setState(114); + setState(119); ((ArithmeticBinaryContext)_localctx).right = operatorExpression(3); } break; @@ -952,9 +965,9 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _localctx = new ArithmeticBinaryContext(new OperatorExpressionContext(_parentctx, _parentState)); ((ArithmeticBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_operatorExpression); - setState(115); + setState(120); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(116); + setState(121); ((ArithmeticBinaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { @@ -965,14 +978,14 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _errHandler.reportMatch(this); consume(); } - setState(117); + setState(122); ((ArithmeticBinaryContext)_localctx).right = operatorExpression(2); } break; } } } - setState(122); + setState(127); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,9,_ctx); } @@ -1096,14 +1109,14 @@ public final PrimaryExpressionContext primaryExpression() throws RecognitionExce enterRule(_localctx, 16, RULE_primaryExpression); int _la; try { - setState(143); + setState(148); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { case 1: _localctx = new ConstantDefaultContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(123); + setState(128); constant(); } break; @@ -1111,7 +1124,7 @@ public final PrimaryExpressionContext primaryExpression() throws RecognitionExce _localctx = new DereferenceContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(124); + setState(129); qualifiedName(); } break; @@ -1119,11 +1132,11 @@ public final PrimaryExpressionContext primaryExpression() throws RecognitionExce _localctx = new ParenthesizedExpressionContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(125); + setState(130); match(LP); - setState(126); + setState(131); booleanExpression(0); - setState(127); + setState(132); match(RP); } break; @@ -1131,37 +1144,37 @@ public final PrimaryExpressionContext primaryExpression() throws RecognitionExce _localctx = new FunctionExpressionContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(129); + setState(134); identifier(); - setState(130); + setState(135); match(LP); - setState(139); + setState(144); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << STRING) | (1L << INTEGER_LITERAL) | (1L << DECIMAL_LITERAL) | (1L << FALSE) | (1L << LP) | (1L << NOT) | (1L << NULL) | (1L << TRUE) | (1L << PLUS) | (1L << MINUS) | (1L << UNQUOTED_IDENTIFIER) | (1L << QUOTED_IDENTIFIER))) != 0)) { { - setState(131); - booleanExpression(0); setState(136); + booleanExpression(0); + setState(141); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(132); + setState(137); match(COMMA); - setState(133); + setState(138); booleanExpression(0); } } - setState(138); + setState(143); _errHandler.sync(this); _la = _input.LA(1); } } } - setState(141); + setState(146); match(RP); } break; @@ -1208,9 +1221,9 @@ public final RowCommandContext rowCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(145); + setState(150); match(ROW); - setState(146); + setState(151); fields(); } } @@ -1262,23 +1275,23 @@ public final FieldsContext fields() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(148); - field(); setState(153); + field(); + setState(158); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,13,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(149); + setState(154); match(COMMA); - setState(150); + setState(155); field(); } } } - setState(155); + setState(160); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,13,_ctx); } @@ -1326,24 +1339,24 @@ public final FieldContext field() throws RecognitionException { FieldContext _localctx = new FieldContext(_ctx, getState()); enterRule(_localctx, 22, RULE_field); try { - setState(161); + setState(166); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(156); + setState(161); booleanExpression(0); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(157); + setState(162); qualifiedName(); - setState(158); + setState(163); match(ASSIGN); - setState(159); + setState(164); booleanExpression(0); } break; @@ -1398,25 +1411,25 @@ public final FromCommandContext fromCommand() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(163); + setState(168); match(FROM); - setState(164); - sourceIdentifier(); setState(169); + sourceIdentifier(); + setState(174); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,15,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(165); + setState(170); match(COMMA); - setState(166); + setState(171); sourceIdentifier(); } } } - setState(171); + setState(176); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,15,_ctx); } @@ -1463,9 +1476,9 @@ public final EvalCommandContext evalCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(172); + setState(177); match(EVAL); - setState(173); + setState(178); fields(); } } @@ -1514,18 +1527,18 @@ public final StatsCommandContext statsCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(175); + setState(180); match(STATS); - setState(176); + setState(181); fields(); - setState(179); + setState(184); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) { case 1: { - setState(177); + setState(182); match(BY); - setState(178); + setState(183); qualifiedNames(); } break; @@ -1572,7 +1585,7 @@ public final SourceIdentifierContext sourceIdentifier() throws RecognitionExcept try { enterOuterAlt(_localctx, 1); { - setState(181); + setState(186); _la = _input.LA(1); if ( !(_la==SRC_UNQUOTED_IDENTIFIER || _la==SRC_QUOTED_IDENTIFIER) ) { _errHandler.recoverInline(this); @@ -1632,23 +1645,23 @@ public final QualifiedNameContext qualifiedName() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(183); - identifier(); setState(188); + identifier(); + setState(193); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,17,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(184); + setState(189); match(DOT); - setState(185); + setState(190); identifier(); } } } - setState(190); + setState(195); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,17,_ctx); } @@ -1702,23 +1715,23 @@ public final QualifiedNamesContext qualifiedNames() throws RecognitionException int _alt; enterOuterAlt(_localctx, 1); { - setState(191); - qualifiedName(); setState(196); + qualifiedName(); + setState(201); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,18,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(192); + setState(197); match(COMMA); - setState(193); + setState(198); qualifiedName(); } } } - setState(198); + setState(203); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,18,_ctx); } @@ -1764,7 +1777,7 @@ public final IdentifierContext identifier() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(199); + setState(204); _la = _input.LA(1); if ( !(_la==UNQUOTED_IDENTIFIER || _la==QUOTED_IDENTIFIER) ) { _errHandler.recoverInline(this); @@ -1877,14 +1890,14 @@ public final ConstantContext constant() throws RecognitionException { ConstantContext _localctx = new ConstantContext(_ctx, getState()); enterRule(_localctx, 38, RULE_constant); try { - setState(205); + setState(210); _errHandler.sync(this); switch (_input.LA(1)) { case NULL: _localctx = new NullLiteralContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(201); + setState(206); match(NULL); } break; @@ -1893,7 +1906,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new NumericLiteralContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(202); + setState(207); number(); } break; @@ -1902,7 +1915,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new BooleanLiteralContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(203); + setState(208); booleanValue(); } break; @@ -1910,7 +1923,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new StringLiteralContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(204); + setState(209); string(); } break; @@ -1957,9 +1970,9 @@ public final LimitCommandContext limitCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(207); + setState(212); match(LIMIT); - setState(208); + setState(213); match(INTEGER_LITERAL); } } @@ -2012,25 +2025,25 @@ public final SortCommandContext sortCommand() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(210); + setState(215); match(SORT); - setState(211); - orderExpression(); setState(216); + orderExpression(); + setState(221); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,20,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(212); + setState(217); match(COMMA); - setState(213); + setState(218); orderExpression(); } } } - setState(218); + setState(223); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,20,_ctx); } @@ -2084,14 +2097,14 @@ public final OrderExpressionContext orderExpression() throws RecognitionExceptio try { enterOuterAlt(_localctx, 1); { - setState(219); + setState(224); booleanExpression(0); - setState(221); + setState(226); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) { case 1: { - setState(220); + setState(225); ((OrderExpressionContext)_localctx).ordering = _input.LT(1); _la = _input.LA(1); if ( !(_la==ASC || _la==DESC) ) { @@ -2105,14 +2118,14 @@ public final OrderExpressionContext orderExpression() throws RecognitionExceptio } break; } - setState(225); + setState(230); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,22,_ctx) ) { case 1: { - setState(223); + setState(228); match(NULLS); - setState(224); + setState(229); ((OrderExpressionContext)_localctx).nullOrdering = _input.LT(1); _la = _input.LA(1); if ( !(_la==FIRST || _la==LAST) ) { @@ -2168,7 +2181,7 @@ public final BooleanValueContext booleanValue() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(227); + setState(232); _la = _input.LA(1); if ( !(_la==FALSE || _la==TRUE) ) { _errHandler.recoverInline(this); @@ -2241,14 +2254,14 @@ public final NumberContext number() throws RecognitionException { NumberContext _localctx = new NumberContext(_ctx, getState()); enterRule(_localctx, 48, RULE_number); try { - setState(231); + setState(236); _errHandler.sync(this); switch (_input.LA(1)) { case DECIMAL_LITERAL: _localctx = new DecimalLiteralContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(229); + setState(234); match(DECIMAL_LITERAL); } break; @@ -2256,7 +2269,7 @@ public final NumberContext number() throws RecognitionException { _localctx = new IntegerLiteralContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(230); + setState(235); match(INTEGER_LITERAL); } break; @@ -2302,7 +2315,7 @@ public final StringContext string() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(233); + setState(238); match(STRING); } } @@ -2350,7 +2363,7 @@ public final ComparisonOperatorContext comparisonOperator() throws RecognitionEx try { enterOuterAlt(_localctx, 1); { - setState(235); + setState(240); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << EQ) | (1L << NEQ) | (1L << LT) | (1L << LTE) | (1L << GT) | (1L << GTE))) != 0)) ) { _errHandler.recoverInline(this); @@ -2373,6 +2386,103 @@ public final ComparisonOperatorContext comparisonOperator() throws RecognitionEx return _localctx; } + public static class ExplainCommandContext extends ParserRuleContext { + public TerminalNode EXPLAIN() { return getToken(EsqlBaseParser.EXPLAIN, 0); } + public SubqueryExpressionContext subqueryExpression() { + return getRuleContext(SubqueryExpressionContext.class,0); + } + public ExplainCommandContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explainCommand; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof EsqlBaseParserListener ) ((EsqlBaseParserListener)listener).enterExplainCommand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof EsqlBaseParserListener ) ((EsqlBaseParserListener)listener).exitExplainCommand(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof EsqlBaseParserVisitor ) return ((EsqlBaseParserVisitor)visitor).visitExplainCommand(this); + else return visitor.visitChildren(this); + } + } + + public final ExplainCommandContext explainCommand() throws RecognitionException { + ExplainCommandContext _localctx = new ExplainCommandContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_explainCommand); + try { + enterOuterAlt(_localctx, 1); + { + setState(242); + match(EXPLAIN); + setState(243); + subqueryExpression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SubqueryExpressionContext extends ParserRuleContext { + public TerminalNode OPENING_BRACKET() { return getToken(EsqlBaseParser.OPENING_BRACKET, 0); } + public QueryContext query() { + return getRuleContext(QueryContext.class,0); + } + public TerminalNode CLOSING_BRACKET() { return getToken(EsqlBaseParser.CLOSING_BRACKET, 0); } + public SubqueryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_subqueryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof EsqlBaseParserListener ) ((EsqlBaseParserListener)listener).enterSubqueryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof EsqlBaseParserListener ) ((EsqlBaseParserListener)listener).exitSubqueryExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof EsqlBaseParserVisitor ) return ((EsqlBaseParserVisitor)visitor).visitSubqueryExpression(this); + else return visitor.visitChildren(this); + } + } + + public final SubqueryExpressionContext subqueryExpression() throws RecognitionException { + SubqueryExpressionContext _localctx = new SubqueryExpressionContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_subqueryExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(245); + match(OPENING_BRACKET); + setState(246); + query(0); + setState(247); + match(CLOSING_BRACKET); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { switch (ruleIndex) { case 1: @@ -2411,83 +2521,87 @@ private boolean operatorExpression_sempred(OperatorExpressionContext _localctx, } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\67\u00f0\4\2\t\2"+ - "\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ - "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3:\u00fc\4\2\t\2\4"+ + "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ + "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ - "\4\32\t\32\4\33\t\33\4\34\t\34\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\7\3"+ - "B\n\3\f\3\16\3E\13\3\3\4\3\4\5\4I\n\4\3\5\3\5\3\5\3\5\3\5\5\5P\n\5\3\6"+ - "\3\6\3\6\3\7\3\7\3\7\3\7\5\7Y\n\7\3\7\3\7\3\7\3\7\3\7\3\7\7\7a\n\7\f\7"+ - "\16\7d\13\7\3\b\3\b\3\b\3\b\3\b\5\bk\n\b\3\t\3\t\3\t\3\t\5\tq\n\t\3\t"+ - "\3\t\3\t\3\t\3\t\3\t\7\ty\n\t\f\t\16\t|\13\t\3\n\3\n\3\n\3\n\3\n\3\n\3"+ - "\n\3\n\3\n\3\n\3\n\7\n\u0089\n\n\f\n\16\n\u008c\13\n\5\n\u008e\n\n\3\n"+ - "\3\n\5\n\u0092\n\n\3\13\3\13\3\13\3\f\3\f\3\f\7\f\u009a\n\f\f\f\16\f\u009d"+ - "\13\f\3\r\3\r\3\r\3\r\3\r\5\r\u00a4\n\r\3\16\3\16\3\16\3\16\7\16\u00aa"+ - "\n\16\f\16\16\16\u00ad\13\16\3\17\3\17\3\17\3\20\3\20\3\20\3\20\5\20\u00b6"+ - "\n\20\3\21\3\21\3\22\3\22\3\22\7\22\u00bd\n\22\f\22\16\22\u00c0\13\22"+ - "\3\23\3\23\3\23\7\23\u00c5\n\23\f\23\16\23\u00c8\13\23\3\24\3\24\3\25"+ - "\3\25\3\25\3\25\5\25\u00d0\n\25\3\26\3\26\3\26\3\27\3\27\3\27\3\27\7\27"+ - "\u00d9\n\27\f\27\16\27\u00dc\13\27\3\30\3\30\5\30\u00e0\n\30\3\30\3\30"+ - "\5\30\u00e4\n\30\3\31\3\31\3\32\3\32\5\32\u00ea\n\32\3\33\3\33\3\34\3"+ - "\34\3\34\2\5\4\f\20\35\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,"+ - ".\60\62\64\66\2\n\3\2)*\3\2+-\3\2\63\64\3\2./\4\2\24\24\27\27\3\2\32\33"+ - "\4\2\31\31\"\"\3\2#(\2\u00f3\28\3\2\2\2\4;\3\2\2\2\6H\3\2\2\2\bO\3\2\2"+ - "\2\nQ\3\2\2\2\fX\3\2\2\2\16j\3\2\2\2\20p\3\2\2\2\22\u0091\3\2\2\2\24\u0093"+ - "\3\2\2\2\26\u0096\3\2\2\2\30\u00a3\3\2\2\2\32\u00a5\3\2\2\2\34\u00ae\3"+ - "\2\2\2\36\u00b1\3\2\2\2 \u00b7\3\2\2\2\"\u00b9\3\2\2\2$\u00c1\3\2\2\2"+ - "&\u00c9\3\2\2\2(\u00cf\3\2\2\2*\u00d1\3\2\2\2,\u00d4\3\2\2\2.\u00dd\3"+ - "\2\2\2\60\u00e5\3\2\2\2\62\u00e9\3\2\2\2\64\u00eb\3\2\2\2\66\u00ed\3\2"+ - "\2\289\5\4\3\29:\7\2\2\3:\3\3\2\2\2;<\b\3\1\2<=\5\6\4\2=C\3\2\2\2>?\f"+ - "\3\2\2?@\7\16\2\2@B\5\b\5\2A>\3\2\2\2BE\3\2\2\2CA\3\2\2\2CD\3\2\2\2D\5"+ - "\3\2\2\2EC\3\2\2\2FI\5\24\13\2GI\5\32\16\2HF\3\2\2\2HG\3\2\2\2I\7\3\2"+ - "\2\2JP\5\34\17\2KP\5*\26\2LP\5,\27\2MP\5\36\20\2NP\5\n\6\2OJ\3\2\2\2O"+ - "K\3\2\2\2OL\3\2\2\2OM\3\2\2\2ON\3\2\2\2P\t\3\2\2\2QR\7\7\2\2RS\5\f\7\2"+ - "S\13\3\2\2\2TU\b\7\1\2UV\7\35\2\2VY\5\f\7\6WY\5\16\b\2XT\3\2\2\2XW\3\2"+ - "\2\2Yb\3\2\2\2Z[\f\4\2\2[\\\7\23\2\2\\a\5\f\7\5]^\f\3\2\2^_\7 \2\2_a\5"+ - "\f\7\4`Z\3\2\2\2`]\3\2\2\2ad\3\2\2\2b`\3\2\2\2bc\3\2\2\2c\r\3\2\2\2db"+ - "\3\2\2\2ek\5\20\t\2fg\5\20\t\2gh\5\66\34\2hi\5\20\t\2ik\3\2\2\2je\3\2"+ - "\2\2jf\3\2\2\2k\17\3\2\2\2lm\b\t\1\2mq\5\22\n\2no\t\2\2\2oq\5\20\t\5p"+ - "l\3\2\2\2pn\3\2\2\2qz\3\2\2\2rs\f\4\2\2st\t\3\2\2ty\5\20\t\5uv\f\3\2\2"+ - "vw\t\2\2\2wy\5\20\t\4xr\3\2\2\2xu\3\2\2\2y|\3\2\2\2zx\3\2\2\2z{\3\2\2"+ - "\2{\21\3\2\2\2|z\3\2\2\2}\u0092\5(\25\2~\u0092\5\"\22\2\177\u0080\7\34"+ - "\2\2\u0080\u0081\5\f\7\2\u0081\u0082\7!\2\2\u0082\u0092\3\2\2\2\u0083"+ - "\u0084\5&\24\2\u0084\u008d\7\34\2\2\u0085\u008a\5\f\7\2\u0086\u0087\7"+ - "\26\2\2\u0087\u0089\5\f\7\2\u0088\u0086\3\2\2\2\u0089\u008c\3\2\2\2\u008a"+ - "\u0088\3\2\2\2\u008a\u008b\3\2\2\2\u008b\u008e\3\2\2\2\u008c\u008a\3\2"+ - "\2\2\u008d\u0085\3\2\2\2\u008d\u008e\3\2\2\2\u008e\u008f\3\2\2\2\u008f"+ - "\u0090\7!\2\2\u0090\u0092\3\2\2\2\u0091}\3\2\2\2\u0091~\3\2\2\2\u0091"+ - "\177\3\2\2\2\u0091\u0083\3\2\2\2\u0092\23\3\2\2\2\u0093\u0094\7\5\2\2"+ - "\u0094\u0095\5\26\f\2\u0095\25\3\2\2\2\u0096\u009b\5\30\r\2\u0097\u0098"+ - "\7\26\2\2\u0098\u009a\5\30\r\2\u0099\u0097\3\2\2\2\u009a\u009d\3\2\2\2"+ - "\u009b\u0099\3\2\2\2\u009b\u009c\3\2\2\2\u009c\27\3\2\2\2\u009d\u009b"+ - "\3\2\2\2\u009e\u00a4\5\f\7\2\u009f\u00a0\5\"\22\2\u00a0\u00a1\7\25\2\2"+ - "\u00a1\u00a2\5\f\7\2\u00a2\u00a4\3\2\2\2\u00a3\u009e\3\2\2\2\u00a3\u009f"+ - "\3\2\2\2\u00a4\31\3\2\2\2\u00a5\u00a6\7\4\2\2\u00a6\u00ab\5 \21\2\u00a7"+ - "\u00a8\7\26\2\2\u00a8\u00aa\5 \21\2\u00a9\u00a7\3\2\2\2\u00aa\u00ad\3"+ - "\2\2\2\u00ab\u00a9\3\2\2\2\u00ab\u00ac\3\2\2\2\u00ac\33\3\2\2\2\u00ad"+ - "\u00ab\3\2\2\2\u00ae\u00af\7\3\2\2\u00af\u00b0\5\26\f\2\u00b0\35\3\2\2"+ - "\2\u00b1\u00b2\7\6\2\2\u00b2\u00b5\5\26\f\2\u00b3\u00b4\7\22\2\2\u00b4"+ - "\u00b6\5$\23\2\u00b5\u00b3\3\2\2\2\u00b5\u00b6\3\2\2\2\u00b6\37\3\2\2"+ - "\2\u00b7\u00b8\t\4\2\2\u00b8!\3\2\2\2\u00b9\u00be\5&\24\2\u00ba\u00bb"+ - "\7\30\2\2\u00bb\u00bd\5&\24\2\u00bc\u00ba\3\2\2\2\u00bd\u00c0\3\2\2\2"+ - "\u00be\u00bc\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf#\3\2\2\2\u00c0\u00be\3"+ - "\2\2\2\u00c1\u00c6\5\"\22\2\u00c2\u00c3\7\26\2\2\u00c3\u00c5\5\"\22\2"+ - "\u00c4\u00c2\3\2\2\2\u00c5\u00c8\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c6\u00c7"+ - "\3\2\2\2\u00c7%\3\2\2\2\u00c8\u00c6\3\2\2\2\u00c9\u00ca\t\5\2\2\u00ca"+ - "\'\3\2\2\2\u00cb\u00d0\7\36\2\2\u00cc\u00d0\5\62\32\2\u00cd\u00d0\5\60"+ - "\31\2\u00ce\u00d0\5\64\33\2\u00cf\u00cb\3\2\2\2\u00cf\u00cc\3\2\2\2\u00cf"+ - "\u00cd\3\2\2\2\u00cf\u00ce\3\2\2\2\u00d0)\3\2\2\2\u00d1\u00d2\7\t\2\2"+ - "\u00d2\u00d3\7\20\2\2\u00d3+\3\2\2\2\u00d4\u00d5\7\b\2\2\u00d5\u00da\5"+ - ".\30\2\u00d6\u00d7\7\26\2\2\u00d7\u00d9\5.\30\2\u00d8\u00d6\3\2\2\2\u00d9"+ - "\u00dc\3\2\2\2\u00da\u00d8\3\2\2\2\u00da\u00db\3\2\2\2\u00db-\3\2\2\2"+ - "\u00dc\u00da\3\2\2\2\u00dd\u00df\5\f\7\2\u00de\u00e0\t\6\2\2\u00df\u00de"+ - "\3\2\2\2\u00df\u00e0\3\2\2\2\u00e0\u00e3\3\2\2\2\u00e1\u00e2\7\37\2\2"+ - "\u00e2\u00e4\t\7\2\2\u00e3\u00e1\3\2\2\2\u00e3\u00e4\3\2\2\2\u00e4/\3"+ - "\2\2\2\u00e5\u00e6\t\b\2\2\u00e6\61\3\2\2\2\u00e7\u00ea\7\21\2\2\u00e8"+ - "\u00ea\7\20\2\2\u00e9\u00e7\3\2\2\2\u00e9\u00e8\3\2\2\2\u00ea\63\3\2\2"+ - "\2\u00eb\u00ec\7\17\2\2\u00ec\65\3\2\2\2\u00ed\u00ee\t\t\2\2\u00ee\67"+ - "\3\2\2\2\32CHOX`bjpxz\u008a\u008d\u0091\u009b\u00a3\u00ab\u00b5\u00be"+ - "\u00c6\u00cf\u00da\u00df\u00e3\u00e9"; + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\3\2\3\2\3\2\3\3\3\3"+ + "\3\3\3\3\3\3\3\3\7\3F\n\3\f\3\16\3I\13\3\3\4\3\4\3\4\5\4N\n\4\3\5\3\5"+ + "\3\5\3\5\3\5\5\5U\n\5\3\6\3\6\3\6\3\7\3\7\3\7\3\7\5\7^\n\7\3\7\3\7\3\7"+ + "\3\7\3\7\3\7\7\7f\n\7\f\7\16\7i\13\7\3\b\3\b\3\b\3\b\3\b\5\bp\n\b\3\t"+ + "\3\t\3\t\3\t\5\tv\n\t\3\t\3\t\3\t\3\t\3\t\3\t\7\t~\n\t\f\t\16\t\u0081"+ + "\13\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\7\n\u008e\n\n\f\n\16"+ + "\n\u0091\13\n\5\n\u0093\n\n\3\n\3\n\5\n\u0097\n\n\3\13\3\13\3\13\3\f\3"+ + "\f\3\f\7\f\u009f\n\f\f\f\16\f\u00a2\13\f\3\r\3\r\3\r\3\r\3\r\5\r\u00a9"+ + "\n\r\3\16\3\16\3\16\3\16\7\16\u00af\n\16\f\16\16\16\u00b2\13\16\3\17\3"+ + "\17\3\17\3\20\3\20\3\20\3\20\5\20\u00bb\n\20\3\21\3\21\3\22\3\22\3\22"+ + "\7\22\u00c2\n\22\f\22\16\22\u00c5\13\22\3\23\3\23\3\23\7\23\u00ca\n\23"+ + "\f\23\16\23\u00cd\13\23\3\24\3\24\3\25\3\25\3\25\3\25\5\25\u00d5\n\25"+ + "\3\26\3\26\3\26\3\27\3\27\3\27\3\27\7\27\u00de\n\27\f\27\16\27\u00e1\13"+ + "\27\3\30\3\30\5\30\u00e5\n\30\3\30\3\30\5\30\u00e9\n\30\3\31\3\31\3\32"+ + "\3\32\5\32\u00ef\n\32\3\33\3\33\3\34\3\34\3\35\3\35\3\35\3\36\3\36\3\36"+ + "\3\36\3\36\2\5\4\f\20\37\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&("+ + "*,.\60\62\64\668:\2\n\3\2,-\3\2.\60\3\2\66\67\3\2\61\62\4\2\25\25\30\30"+ + "\3\2\33\34\4\2\32\32%%\3\2&+\2\u00fe\2<\3\2\2\2\4?\3\2\2\2\6M\3\2\2\2"+ + "\bT\3\2\2\2\nV\3\2\2\2\f]\3\2\2\2\16o\3\2\2\2\20u\3\2\2\2\22\u0096\3\2"+ + "\2\2\24\u0098\3\2\2\2\26\u009b\3\2\2\2\30\u00a8\3\2\2\2\32\u00aa\3\2\2"+ + "\2\34\u00b3\3\2\2\2\36\u00b6\3\2\2\2 \u00bc\3\2\2\2\"\u00be\3\2\2\2$\u00c6"+ + "\3\2\2\2&\u00ce\3\2\2\2(\u00d4\3\2\2\2*\u00d6\3\2\2\2,\u00d9\3\2\2\2."+ + "\u00e2\3\2\2\2\60\u00ea\3\2\2\2\62\u00ee\3\2\2\2\64\u00f0\3\2\2\2\66\u00f2"+ + "\3\2\2\28\u00f4\3\2\2\2:\u00f7\3\2\2\2<=\5\4\3\2=>\7\2\2\3>\3\3\2\2\2"+ + "?@\b\3\1\2@A\5\6\4\2AG\3\2\2\2BC\f\3\2\2CD\7\17\2\2DF\5\b\5\2EB\3\2\2"+ + "\2FI\3\2\2\2GE\3\2\2\2GH\3\2\2\2H\5\3\2\2\2IG\3\2\2\2JN\58\35\2KN\5\32"+ + "\16\2LN\5\24\13\2MJ\3\2\2\2MK\3\2\2\2ML\3\2\2\2N\7\3\2\2\2OU\5\34\17\2"+ + "PU\5*\26\2QU\5,\27\2RU\5\36\20\2SU\5\n\6\2TO\3\2\2\2TP\3\2\2\2TQ\3\2\2"+ + "\2TR\3\2\2\2TS\3\2\2\2U\t\3\2\2\2VW\7\b\2\2WX\5\f\7\2X\13\3\2\2\2YZ\b"+ + "\7\1\2Z[\7 \2\2[^\5\f\7\6\\^\5\16\b\2]Y\3\2\2\2]\\\3\2\2\2^g\3\2\2\2_"+ + "`\f\4\2\2`a\7\24\2\2af\5\f\7\5bc\f\3\2\2cd\7#\2\2df\5\f\7\4e_\3\2\2\2"+ + "eb\3\2\2\2fi\3\2\2\2ge\3\2\2\2gh\3\2\2\2h\r\3\2\2\2ig\3\2\2\2jp\5\20\t"+ + "\2kl\5\20\t\2lm\5\66\34\2mn\5\20\t\2np\3\2\2\2oj\3\2\2\2ok\3\2\2\2p\17"+ + "\3\2\2\2qr\b\t\1\2rv\5\22\n\2st\t\2\2\2tv\5\20\t\5uq\3\2\2\2us\3\2\2\2"+ + "v\177\3\2\2\2wx\f\4\2\2xy\t\3\2\2y~\5\20\t\5z{\f\3\2\2{|\t\2\2\2|~\5\20"+ + "\t\4}w\3\2\2\2}z\3\2\2\2~\u0081\3\2\2\2\177}\3\2\2\2\177\u0080\3\2\2\2"+ + "\u0080\21\3\2\2\2\u0081\177\3\2\2\2\u0082\u0097\5(\25\2\u0083\u0097\5"+ + "\"\22\2\u0084\u0085\7\35\2\2\u0085\u0086\5\f\7\2\u0086\u0087\7$\2\2\u0087"+ + "\u0097\3\2\2\2\u0088\u0089\5&\24\2\u0089\u0092\7\35\2\2\u008a\u008f\5"+ + "\f\7\2\u008b\u008c\7\27\2\2\u008c\u008e\5\f\7\2\u008d\u008b\3\2\2\2\u008e"+ + "\u0091\3\2\2\2\u008f\u008d\3\2\2\2\u008f\u0090\3\2\2\2\u0090\u0093\3\2"+ + "\2\2\u0091\u008f\3\2\2\2\u0092\u008a\3\2\2\2\u0092\u0093\3\2\2\2\u0093"+ + "\u0094\3\2\2\2\u0094\u0095\7$\2\2\u0095\u0097\3\2\2\2\u0096\u0082\3\2"+ + "\2\2\u0096\u0083\3\2\2\2\u0096\u0084\3\2\2\2\u0096\u0088\3\2\2\2\u0097"+ + "\23\3\2\2\2\u0098\u0099\7\6\2\2\u0099\u009a\5\26\f\2\u009a\25\3\2\2\2"+ + "\u009b\u00a0\5\30\r\2\u009c\u009d\7\27\2\2\u009d\u009f\5\30\r\2\u009e"+ + "\u009c\3\2\2\2\u009f\u00a2\3\2\2\2\u00a0\u009e\3\2\2\2\u00a0\u00a1\3\2"+ + "\2\2\u00a1\27\3\2\2\2\u00a2\u00a0\3\2\2\2\u00a3\u00a9\5\f\7\2\u00a4\u00a5"+ + "\5\"\22\2\u00a5\u00a6\7\26\2\2\u00a6\u00a7\5\f\7\2\u00a7\u00a9\3\2\2\2"+ + "\u00a8\u00a3\3\2\2\2\u00a8\u00a4\3\2\2\2\u00a9\31\3\2\2\2\u00aa\u00ab"+ + "\7\5\2\2\u00ab\u00b0\5 \21\2\u00ac\u00ad\7\27\2\2\u00ad\u00af\5 \21\2"+ + "\u00ae\u00ac\3\2\2\2\u00af\u00b2\3\2\2\2\u00b0\u00ae\3\2\2\2\u00b0\u00b1"+ + "\3\2\2\2\u00b1\33\3\2\2\2\u00b2\u00b0\3\2\2\2\u00b3\u00b4\7\3\2\2\u00b4"+ + "\u00b5\5\26\f\2\u00b5\35\3\2\2\2\u00b6\u00b7\7\7\2\2\u00b7\u00ba\5\26"+ + "\f\2\u00b8\u00b9\7\23\2\2\u00b9\u00bb\5$\23\2\u00ba\u00b8\3\2\2\2\u00ba"+ + "\u00bb\3\2\2\2\u00bb\37\3\2\2\2\u00bc\u00bd\t\4\2\2\u00bd!\3\2\2\2\u00be"+ + "\u00c3\5&\24\2\u00bf\u00c0\7\31\2\2\u00c0\u00c2\5&\24\2\u00c1\u00bf\3"+ + "\2\2\2\u00c2\u00c5\3\2\2\2\u00c3\u00c1\3\2\2\2\u00c3\u00c4\3\2\2\2\u00c4"+ + "#\3\2\2\2\u00c5\u00c3\3\2\2\2\u00c6\u00cb\5\"\22\2\u00c7\u00c8\7\27\2"+ + "\2\u00c8\u00ca\5\"\22\2\u00c9\u00c7\3\2\2\2\u00ca\u00cd\3\2\2\2\u00cb"+ + "\u00c9\3\2\2\2\u00cb\u00cc\3\2\2\2\u00cc%\3\2\2\2\u00cd\u00cb\3\2\2\2"+ + "\u00ce\u00cf\t\5\2\2\u00cf\'\3\2\2\2\u00d0\u00d5\7!\2\2\u00d1\u00d5\5"+ + "\62\32\2\u00d2\u00d5\5\60\31\2\u00d3\u00d5\5\64\33\2\u00d4\u00d0\3\2\2"+ + "\2\u00d4\u00d1\3\2\2\2\u00d4\u00d2\3\2\2\2\u00d4\u00d3\3\2\2\2\u00d5)"+ + "\3\2\2\2\u00d6\u00d7\7\n\2\2\u00d7\u00d8\7\21\2\2\u00d8+\3\2\2\2\u00d9"+ + "\u00da\7\t\2\2\u00da\u00df\5.\30\2\u00db\u00dc\7\27\2\2\u00dc\u00de\5"+ + ".\30\2\u00dd\u00db\3\2\2\2\u00de\u00e1\3\2\2\2\u00df\u00dd\3\2\2\2\u00df"+ + "\u00e0\3\2\2\2\u00e0-\3\2\2\2\u00e1\u00df\3\2\2\2\u00e2\u00e4\5\f\7\2"+ + "\u00e3\u00e5\t\6\2\2\u00e4\u00e3\3\2\2\2\u00e4\u00e5\3\2\2\2\u00e5\u00e8"+ + "\3\2\2\2\u00e6\u00e7\7\"\2\2\u00e7\u00e9\t\7\2\2\u00e8\u00e6\3\2\2\2\u00e8"+ + "\u00e9\3\2\2\2\u00e9/\3\2\2\2\u00ea\u00eb\t\b\2\2\u00eb\61\3\2\2\2\u00ec"+ + "\u00ef\7\22\2\2\u00ed\u00ef\7\21\2\2\u00ee\u00ec\3\2\2\2\u00ee\u00ed\3"+ + "\2\2\2\u00ef\63\3\2\2\2\u00f0\u00f1\7\20\2\2\u00f1\65\3\2\2\2\u00f2\u00f3"+ + "\t\t\2\2\u00f3\67\3\2\2\2\u00f4\u00f5\7\4\2\2\u00f5\u00f6\5:\36\2\u00f6"+ + "9\3\2\2\2\u00f7\u00f8\7\36\2\2\u00f8\u00f9\5\4\3\2\u00f9\u00fa\7\37\2"+ + "\2\u00fa;\3\2\2\2\32GMT]egou}\177\u008f\u0092\u0096\u00a0\u00a8\u00b0"+ + "\u00ba\u00c3\u00cb\u00d4\u00df\u00e4\u00e8\u00ee"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserBaseListener.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserBaseListener.java index b6a29db50c36a..721412158010c 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserBaseListener.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserBaseListener.java @@ -491,6 +491,30 @@ public class EsqlBaseParserBaseListener implements EsqlBaseParserListener { *

The default implementation does nothing.

*/ @Override public void exitComparisonOperator(EsqlBaseParser.ComparisonOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExplainCommand(EsqlBaseParser.ExplainCommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExplainCommand(EsqlBaseParser.ExplainCommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSubqueryExpression(EsqlBaseParser.SubqueryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSubqueryExpression(EsqlBaseParser.SubqueryExpressionContext ctx) { } /** * {@inheritDoc} diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserBaseVisitor.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserBaseVisitor.java index e0c132f4abc12..e97a0b444745a 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserBaseVisitor.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserBaseVisitor.java @@ -291,4 +291,18 @@ public class EsqlBaseParserBaseVisitor extends AbstractParseTreeVisitor im * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitComparisonOperator(EsqlBaseParser.ComparisonOperatorContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExplainCommand(EsqlBaseParser.ExplainCommandContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSubqueryExpression(EsqlBaseParser.SubqueryExpressionContext ctx) { return visitChildren(ctx); } } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserListener.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserListener.java index bd7bbda35c88e..1f7b38594c6fe 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserListener.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserListener.java @@ -447,4 +447,24 @@ public interface EsqlBaseParserListener extends ParseTreeListener { * @param ctx the parse tree */ void exitComparisonOperator(EsqlBaseParser.ComparisonOperatorContext ctx); + /** + * Enter a parse tree produced by {@link EsqlBaseParser#explainCommand}. + * @param ctx the parse tree + */ + void enterExplainCommand(EsqlBaseParser.ExplainCommandContext ctx); + /** + * Exit a parse tree produced by {@link EsqlBaseParser#explainCommand}. + * @param ctx the parse tree + */ + void exitExplainCommand(EsqlBaseParser.ExplainCommandContext ctx); + /** + * Enter a parse tree produced by {@link EsqlBaseParser#subqueryExpression}. + * @param ctx the parse tree + */ + void enterSubqueryExpression(EsqlBaseParser.SubqueryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link EsqlBaseParser#subqueryExpression}. + * @param ctx the parse tree + */ + void exitSubqueryExpression(EsqlBaseParser.SubqueryExpressionContext ctx); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserVisitor.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserVisitor.java index 3011c73a1f284..5cdcd5ddbcbf0 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserVisitor.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParserVisitor.java @@ -270,4 +270,16 @@ public interface EsqlBaseParserVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitComparisonOperator(EsqlBaseParser.ComparisonOperatorContext ctx); + /** + * Visit a parse tree produced by {@link EsqlBaseParser#explainCommand}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExplainCommand(EsqlBaseParser.ExplainCommandContext ctx); + /** + * Visit a parse tree produced by {@link EsqlBaseParser#subqueryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSubqueryExpression(EsqlBaseParser.SubqueryExpressionContext ctx); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java index 346f270017ff3..abe43c0a6d48c 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java @@ -9,6 +9,7 @@ import org.antlr.v4.runtime.tree.ParseTree; import org.elasticsearch.xpack.esql.plan.logical.Eval; +import org.elasticsearch.xpack.esql.plan.logical.Explain; import org.elasticsearch.xpack.esql.plan.logical.Row; import org.elasticsearch.xpack.ql.expression.Alias; import org.elasticsearch.xpack.ql.expression.Expression; @@ -123,5 +124,10 @@ private String indexPatterns(EsqlBaseParser.FromCommandContext ctx) { return ctx.sourceIdentifier().stream().map(this::visitSourceIdentifier).collect(Collectors.joining(",")); } + @Override + public Object visitExplainCommand(EsqlBaseParser.ExplainCommandContext ctx) { + return new Explain(source(ctx), typedParsing(this, ctx.subqueryExpression().query(), LogicalPlan.class)); + } + interface PlanFactory extends Function {} } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Explain.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Explain.java new file mode 100644 index 0000000000000..3981bec6e4d51 --- /dev/null +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Explain.java @@ -0,0 +1,73 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +package org.elasticsearch.xpack.esql.plan.logical; + +import org.elasticsearch.action.ActionListener; +import org.elasticsearch.xpack.esql.session.EsqlSession; +import org.elasticsearch.xpack.esql.session.Executable; +import org.elasticsearch.xpack.esql.session.Result; +import org.elasticsearch.xpack.ql.expression.Attribute; +import org.elasticsearch.xpack.ql.expression.ReferenceAttribute; +import org.elasticsearch.xpack.ql.plan.logical.LeafPlan; +import org.elasticsearch.xpack.ql.plan.logical.LogicalPlan; +import org.elasticsearch.xpack.ql.tree.NodeInfo; +import org.elasticsearch.xpack.ql.tree.Source; +import org.elasticsearch.xpack.ql.type.DataTypes; + +import java.util.List; +import java.util.Objects; + +public class Explain extends LeafPlan implements Executable { + + public enum Type { + PARSED + } + + private final LogicalPlan query; + + public Explain(Source source, LogicalPlan query) { + super(source); + this.query = query; + } + + @Override + public void execute(EsqlSession session, ActionListener listener) { + listener.onResponse(new Result(output(), List.of(List.of(query.toString(), Type.PARSED.toString())))); + } + + @Override + public List output() { + return List.of( + new ReferenceAttribute(Source.EMPTY, "plan", DataTypes.KEYWORD), + new ReferenceAttribute(Source.EMPTY, "type", DataTypes.KEYWORD) + ); + } + + @Override + public boolean expressionsResolved() { + return true; + } + + @Override + protected NodeInfo info() { + return NodeInfo.create(this, Explain::new, query); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Explain explain = (Explain) o; + return Objects.equals(query, explain.query); + } + + @Override + public int hashCode() { + return Objects.hash(query); + } +} diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Row.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Row.java index 908a38bf6f21a..14363e914fbd9 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Row.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Row.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.esql.plan.logical; import org.elasticsearch.action.ActionListener; +import org.elasticsearch.xpack.esql.session.EsqlSession; import org.elasticsearch.xpack.esql.session.Executable; import org.elasticsearch.xpack.esql.session.Result; import org.elasticsearch.xpack.ql.expression.Alias; @@ -41,7 +42,7 @@ public List output() { } @Override - public void execute(ActionListener listener) { + public void execute(EsqlSession session, ActionListener listener) { listener.onResponse(new Result(output(), List.of(fields.stream().map(f -> { if (f instanceof Alias) { return ((Alias) f).child().fold(); diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java index 5b2fe9d4b7884..ff1cd2a3d1461 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java @@ -17,7 +17,7 @@ public class EsqlSession { public void execute(String query, ActionListener listener) { try { Executable plan = (Executable) parse(query); - plan.execute(listener); + plan.execute(this, listener); } catch (ParsingException pe) { listener.onFailure(pe); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/Executable.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/Executable.java index 882ceb70524cf..959dae21337ad 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/Executable.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/Executable.java @@ -10,5 +10,5 @@ import org.elasticsearch.action.ActionListener; public interface Executable { - void execute(ActionListener listener); + void execute(EsqlSession session, ActionListener listener); } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java index a88d88ef1151d..e15a5b9c6214b 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java @@ -9,6 +9,7 @@ import org.elasticsearch.test.ESTestCase; import org.elasticsearch.xpack.esql.plan.logical.Eval; +import org.elasticsearch.xpack.esql.plan.logical.Explain; import org.elasticsearch.xpack.esql.plan.logical.Row; import org.elasticsearch.xpack.ql.expression.Alias; import org.elasticsearch.xpack.ql.expression.Literal; @@ -278,6 +279,28 @@ public void testBasicSortCommand() { assertThat(orderBy.children().get(0).children().get(0), instanceOf(Project.class)); } + public void testSubquery() { + assertEquals(new Explain(EMPTY, PROCESSING_CMD_INPUT), statement("explain [ row a = 1 ]")); + } + + public void testSubqueryWithPipe() { + assertEquals( + new Limit(EMPTY, integer(10), new Explain(EMPTY, PROCESSING_CMD_INPUT)), + statement("explain [ row a = 1 ] | limit 10") + ); + } + + public void testNestedSubqueries() { + assertEquals( + new Limit( + EMPTY, + integer(10), + new Explain(EMPTY, new Limit(EMPTY, integer(5), new Explain(EMPTY, new Limit(EMPTY, integer(1), PROCESSING_CMD_INPUT)))) + ), + statement("explain [ explain [ row a = 1 | limit 1 ] | limit 5 ] | limit 10") + ); + } + private void assertIdentifierAsIndexPattern(String identifier, String statement) { LogicalPlan from = statement(statement); assertThat(from, instanceOf(Project.class));