diff --git a/server/src/main/resources/transport/definitions/referable/esql_limit_by.csv b/server/src/main/resources/transport/definitions/referable/esql_limit_by.csv new file mode 100644 index 0000000000000..04beeb8a80d86 --- /dev/null +++ b/server/src/main/resources/transport/definitions/referable/esql_limit_by.csv @@ -0,0 +1 @@ +9314000 diff --git a/server/src/main/resources/transport/upper_bounds/9.4.csv b/server/src/main/resources/transport/upper_bounds/9.4.csv index 9a0ef62c71602..39804535ee10f 100644 --- a/server/src/main/resources/transport/upper_bounds/9.4.csv +++ b/server/src/main/resources/transport/upper_bounds/9.4.csv @@ -1 +1 @@ -sql_optional_allow_partial_search_results,9313000 +esql_limit_by,9314000 diff --git a/x-pack/plugin/esql/build.gradle b/x-pack/plugin/esql/build.gradle index 8f88fecaed8a5..e295e51879cf3 100644 --- a/x-pack/plugin/esql/build.gradle +++ b/x-pack/plugin/esql/build.gradle @@ -431,7 +431,6 @@ tasks.register("regenParser", JavaExec) { '-package', 'org.elasticsearch.xpack.esql.parser', '-listener', '-visitor', - '-lib', outputPath, '-lib', "${file(grammarPath)}/parser", '-o', outputPath, "${file(grammarPath)}/EsqlBaseParser.g4" diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/EsqlTestUtils.java b/x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/EsqlTestUtils.java index 123cea7e0a658..5e702a72863ea 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/EsqlTestUtils.java +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/EsqlTestUtils.java @@ -131,6 +131,7 @@ import org.elasticsearch.xpack.esql.plan.QuerySettings; import org.elasticsearch.xpack.esql.plan.logical.Enrich; import org.elasticsearch.xpack.esql.plan.logical.EsRelation; +import org.elasticsearch.xpack.esql.plan.logical.Eval; import org.elasticsearch.xpack.esql.plan.logical.Explain; import org.elasticsearch.xpack.esql.plan.logical.Limit; import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; @@ -227,6 +228,7 @@ import static org.elasticsearch.xpack.esql.parser.ParserUtils.ParamClassification.VALUE; import static org.elasticsearch.xpack.esql.plan.QuerySettings.UNMAPPED_FIELDS; import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.instanceOf; import static org.junit.Assert.assertNotNull; @@ -758,6 +760,20 @@ public static Limit asLimit(Object node, Integer limitLiteral, Boolean duplicate return limit; } + /** + * Assert that an {@link Eval}'s fields are literal-valued aliases with the given names and values (in order). + */ + public static Eval assertEvalFields(Eval eval, String[] names, Object[] values) { + var fields = eval.fields(); + Assert.assertEquals(names.length, fields.size()); + Assert.assertEquals(names.length, values.length); + for (int i = 0; i < names.length; i++) { + assertThat(fields.get(i).name(), equalTo(names[i])); + assertThat(as(fields.get(i).child(), Literal.class).value(), equalTo(values[i])); + } + return eval; + } + public static Map loadMapping(String name) { return LoadMapping.loadMapping(name); } diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/limit.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/limit.csv-spec index b13ed51e620c4..c179be05ff508 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/limit.csv-spec +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/limit.csv-spec @@ -14,3 +14,201 @@ emp_no:integer 10004 10005 ; + +// +// LIMIT BY +// + +limitBy +required_capability: limit_by + +FROM employees +| WHERE emp_no IN (10001, 10002, 10003, 10005, 10006) +| SORT emp_no +| LIMIT 1000 +| LIMIT 5 BY languages +| KEEP emp_no, first_name, languages +; + +emp_no:integer | first_name:keyword | languages:integer +10001 | Georgi | 2 +10002 | Bezalel | 5 +10003 | Parto | 4 +10005 | Kyoichi | 1 +10006 | Anneke | 3 +; + +limitByLimit0 +required_capability: limit_by + +FROM employees +| WHERE emp_no IN (10001, 10002, 10003) +| SORT emp_no +| LIMIT 1000 +| LIMIT 0 BY languages +| KEEP emp_no, languages +; + +emp_no:integer | languages:integer +; + +limitByMultipleColumns +required_capability: limit_by + +FROM employees +| WHERE emp_no IN (10001, 10003, 10004, 10007) +| SORT emp_no +| LIMIT 1000 +| LIMIT 5 BY languages, gender +| KEEP emp_no, first_name, languages, gender +; + +emp_no:integer | first_name:keyword | languages:integer | gender:keyword +10001 | Georgi | 2 | M +10003 | Parto | 4 | M +10004 | Chirstian | 5 | M +10007 | Tzvetan | 4 | F +; + +limitByWithExpression +required_capability: limit_by + +FROM employees +| WHERE emp_no IN (10001, 10002, 10003, 10004, 10005) +| SORT emp_no +| LIMIT 1000 +| LIMIT 5 BY languages * 2 +| KEEP emp_no, first_name, languages +; + +emp_no:integer | first_name:keyword | languages:integer +10001 | Georgi | 2 +10002 | Bezalel | 5 +10003 | Parto | 4 +10004 | Chirstian | 5 +10005 | Kyoichi | 1 +; + +limitByMultivalueGroupKey +required_capability: limit_by + +FROM employees +| WHERE emp_no IN (10001, 10008) +| SORT emp_no +| LIMIT 1000 +| LIMIT 5 BY job_positions +| KEEP emp_no, first_name, job_positions +; + +emp_no:integer | first_name:keyword | job_positions:keyword +10001 | Georgi | [Accountant, Senior Python Developer] +10008 | Saniya | [Internship, Junior Developer, Purchase Manager, Senior Python Developer] +; + +limitByNullGroup +required_capability: limit_by + +FROM employees +| WHERE emp_no IN (10001, 10020) +| SORT emp_no +| LIMIT 1000 +| LIMIT 5 BY languages +| KEEP emp_no, first_name, languages +; + +emp_no:integer | first_name:keyword | languages:integer +10001 | Georgi | 2 +10020 | Mayuko | null +; + +limitByConstant +required_capability: limit_by + +FROM employees +| WHERE emp_no IN (10001, 10002, 10003, 10005, 10006) +| SORT emp_no +| LIMIT 1000 +| LIMIT 2 BY 5*42 +| KEEP emp_no, first_name, languages +; + +emp_no:integer | first_name:keyword | languages:integer +10001 | Georgi | 2 +10002 | Bezalel | 5 +; + +limitByWithExpressionAndConstant +required_capability: limit_by + +FROM employees +| WHERE emp_no IN (10001, 10002, 10003, 10004, 10005) +| SORT emp_no +| LIMIT 1000 +| LIMIT 5 BY languages * 2, 20 - 5 * 2 +| KEEP emp_no, first_name, languages +; + +emp_no:integer | first_name:keyword | languages:integer +10001 | Georgi | 2 +10002 | Bezalel | 5 +10003 | Parto | 4 +10004 | Chirstian | 5 +10005 | Kyoichi | 1 +; + +limitByWithAlias +required_capability: limit_by + +FROM employees +| WHERE emp_no IN (10001, 10002, 10003, 10004, 10005) +| SORT emp_no +| LIMIT 1000 +| EVAL g = languages * 2 +| LIMIT 5 BY g +| KEEP emp_no, first_name, languages +; + +emp_no:integer | first_name:keyword | languages:integer +10001 | Georgi | 2 +10002 | Bezalel | 5 +10003 | Parto | 4 +10004 | Chirstian | 5 +10005 | Kyoichi | 1 +; + +limitByThenStats +required_capability: limit_by + +FROM employees +| LIMIT 2 BY languages +| STATS c = COUNT(*) BY languages +| SORT languages ASC NULLS LAST +; + +c:long | languages:integer +2 | 1 +2 | 2 +2 | 3 +2 | 4 +2 | 5 +2 | null +; + +limitByPrecededByStats +required_capability: limit_by + +FROM employees +| STATS cnt=COUNT(*) BY job_positions, languages +| SORT job_positions, cnt DESC, languages +| LIMIT 1000 +| LIMIT 1 BY job_positions +| LIMIT 5 +; + +cnt:long | job_positions:keyword | languages:integer +5 | Accountant | 2 +5 | Architect | 4 +4 | Business Analyst | 2 +3 | Data Scientist | 1 +5 | Head Human Resources | 5 +; diff --git a/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 b/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 index 452d147e4c5dc..e60294212437e 100644 --- a/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 +++ b/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 @@ -221,7 +221,11 @@ stringOrParameter ; limitCommand - : LIMIT constant + : LIMIT constant limitByGroupKey? + ; + +limitByGroupKey: + {this.isDevVersion()}? BY grouping=fields ; sortCommand diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java index 92d275b482792..f3bc4884ff676 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java @@ -2190,6 +2190,12 @@ public enum Cap { */ EXTERNAL_COMMAND(Build.current().isSnapshot()), + /** + + * Enables LIMIT N BY without a preceding SORT. + */ + LIMIT_BY, + /** * https://github.com/elastic/elasticsearch/issues/142219 */ diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/Verifier.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/Verifier.java index c21d72b71e8bd..5abb2df106dfd 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/Verifier.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/Verifier.java @@ -36,7 +36,9 @@ import org.elasticsearch.xpack.esql.plan.logical.Limit; import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; import org.elasticsearch.xpack.esql.plan.logical.Lookup; +import org.elasticsearch.xpack.esql.plan.logical.OrderBy; import org.elasticsearch.xpack.esql.plan.logical.Project; +import org.elasticsearch.xpack.esql.plan.logical.UnaryPlan; import org.elasticsearch.xpack.esql.plan.logical.promql.PromqlCommand; import org.elasticsearch.xpack.esql.telemetry.FeatureMetric; import org.elasticsearch.xpack.esql.telemetry.Metrics; @@ -119,6 +121,7 @@ Collection verify(LogicalPlan plan, BitSet partialMetrics) { checkUnsupportedAttributeRenaming(p, failures); checkInsist(p, failures); checkLimitBeforeInlineStats(p, failures); + checkLimitBy(p, failures); }); if (failures.hasFailures() == false) { @@ -332,6 +335,23 @@ private static void checkLimitBeforeInlineStats(LogicalPlan plan, Failures failu } } + // TODO: remove this check when SORT + LIMIT BY (TopN) support is added + private static void checkLimitBy(LogicalPlan plan, Failures failures) { + if (plan instanceof Limit limit && limit.groupings().isEmpty() == false) { + LogicalPlan child = limit.child(); + while (child instanceof UnaryPlan unary) { + if (child instanceof OrderBy) { + failures.add(fail(limit, "SORT cannot be used before LIMIT BY")); + break; + } + if (child instanceof Limit l && l.groupings().isEmpty()) { + break; + } + child = unary.child(); + } + } + } + private void licenseCheck(LogicalPlan plan, Failures failures) { Consumer> licenseCheck = n -> { if (n instanceof LicenseAware la && la.licenseCheck(licenseState) == false) { diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/core/expression/Expressions.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/core/expression/Expressions.java index eb86ba0e2f972..20f9bc896ad82 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/core/expression/Expressions.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/core/expression/Expressions.java @@ -178,6 +178,21 @@ public static boolean equalsAsAttribute(Expression left, Expression right) { return true; } + public static boolean listSemanticEquals(List leftList, List rightList) { + if (leftList.size() != rightList.size()) { + return false; + } + for (int i = 0; i < leftList.size(); i++) { + Expression left = leftList.get(i); + Expression right = rightList.get(i); + assert left != null && right != null; + if (left.semanticEquals(right) == false) { + return false; + } + } + return true; + } + public static List> aliases(List named) { // an alias of same name and data type can be reused (by mistake): need to use a list to collect all refs (and later report them) List> aliases = new ArrayList<>(); diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizer.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizer.java index 5109cd0a0c60e..72faac05a2910 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizer.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizer.java @@ -37,6 +37,7 @@ import org.elasticsearch.xpack.esql.optimizer.rules.logical.PruneEmptyAggregates; import org.elasticsearch.xpack.esql.optimizer.rules.logical.PruneEmptyForkBranches; import org.elasticsearch.xpack.esql.optimizer.rules.logical.PruneFilters; +import org.elasticsearch.xpack.esql.optimizer.rules.logical.PruneLiteralsInLimitBy; import org.elasticsearch.xpack.esql.optimizer.rules.logical.PruneLiteralsInOrderBy; import org.elasticsearch.xpack.esql.optimizer.rules.logical.PruneRedundantOrderBy; import org.elasticsearch.xpack.esql.optimizer.rules.logical.PruneRedundantSortClauses; @@ -60,6 +61,7 @@ import org.elasticsearch.xpack.esql.optimizer.rules.logical.ReplaceAggregateNestedExpressionWithEval; import org.elasticsearch.xpack.esql.optimizer.rules.logical.ReplaceAliasingEvalWithProject; import org.elasticsearch.xpack.esql.optimizer.rules.logical.ReplaceLimitAndSortAsTopN; +import org.elasticsearch.xpack.esql.optimizer.rules.logical.ReplaceLimitByExpressionWithEval; import org.elasticsearch.xpack.esql.optimizer.rules.logical.ReplaceOrderByExpressionWithEval; import org.elasticsearch.xpack.esql.optimizer.rules.logical.ReplaceRegexMatch; import org.elasticsearch.xpack.esql.optimizer.rules.logical.ReplaceRowAsLocalRelation; @@ -181,6 +183,7 @@ protected static Batch substitutions() { // check for a trivial conversion introduced by a surrogate new ReplaceTrivialTypeConversions(), new ReplaceOrderByExpressionWithEval(), + new ReplaceLimitByExpressionWithEval(), // new NormalizeAggregate(), - waits on https://github.com/elastic/elasticsearch/issues/100634 new SubstituteApproximationPlan() ); @@ -224,6 +227,7 @@ protected static Batch operators() { new PruneFilters(), new PruneColumns(), new PruneLiteralsInOrderBy(), + new PruneLiteralsInLimitBy(), new PushDownAndCombineLimits(), new PushLimitToKnn(), new PushDownAndCombineFilters(), diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/CombineLimitTopN.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/CombineLimitTopN.java index 0235d64603fa7..676ce7fd7b758 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/CombineLimitTopN.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/CombineLimitTopN.java @@ -25,7 +25,8 @@ public CombineLimitTopN() { @Override public LogicalPlan rule(Limit limit) { - if (limit.child() instanceof TopN topn) { + // TODO: update this check when SORT + LIMIT BY (TopN) support is added + if (limit.groupings().isEmpty() && limit.child() instanceof TopN topn) { int thisLimitValue = Foldables.limitValue(limit.limit(), limit.sourceText()); int topNValue = Foldables.limitValue(topn.limit(), topn.sourceText()); if (topNValue <= thisLimitValue) { diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/HoistRemoteEnrichLimit.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/HoistRemoteEnrichLimit.java index e6e46596bab10..d4d9af8e97de9 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/HoistRemoteEnrichLimit.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/HoistRemoteEnrichLimit.java @@ -18,6 +18,7 @@ import java.util.Collections; import java.util.Comparator; import java.util.IdentityHashMap; +import java.util.List; import java.util.Set; /** @@ -41,8 +42,9 @@ protected LogicalPlan rule(Enrich en, LogicalOptimizerContext ctx) { // Enrich. Set seenLimits = Collections.newSetFromMap(new IdentityHashMap<>()); en.child().forEachDownMayReturnEarly((p, stop) -> { - if (p instanceof Limit l && l.local() == false) { - // Local limits can be ignored here as they are always duplicates that have another limit upstairs + if (p instanceof Limit l && l.local() == false && l.groupings().isEmpty()) { + // Local limits can be ignored here as they are always duplicates that have another limit upstairs. + // LIMIT BY limits are excluded: per-group semantics differ from a global limit. seenLimits.add(l); return; } @@ -67,7 +69,7 @@ protected LogicalPlan rule(Enrich en, LogicalOptimizerContext ctx) { // Shouldn't actually throw because we checked seenLimits is not empty Limit lowestLimit = seenLimits.stream().min(Comparator.comparing(l -> (int) l.limit().fold(ctx.foldCtx()))).orElseThrow(); // Insert new lowest limit on top of the Enrich, and mark it as duplicated since we don't want it to be pushed down - return new Limit(lowestLimit.source(), lowestLimit.limit(), transformLimits, true, false); + return new Limit(lowestLimit.source(), lowestLimit.limit(), transformLimits, List.of(), true, false); } return en; } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PropagateEvalFoldables.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PropagateEvalFoldables.java index 5e1da4c02939e..40f76bc8b0710 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PropagateEvalFoldables.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PropagateEvalFoldables.java @@ -16,6 +16,7 @@ import org.elasticsearch.xpack.esql.plan.logical.Aggregate; import org.elasticsearch.xpack.esql.plan.logical.Eval; import org.elasticsearch.xpack.esql.plan.logical.Filter; +import org.elasticsearch.xpack.esql.plan.logical.Limit; import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; import org.elasticsearch.xpack.esql.plan.logical.Row; import org.elasticsearch.xpack.esql.rule.ParameterizedRule; @@ -56,10 +57,10 @@ public LogicalPlan apply(LogicalPlan plan, LogicalOptimizerContext ctx) { } }); } - // Apply the replacement inside Filter, Eval and Row (which shouldn't make a difference) + // Apply the replacement inside Filter, Eval, Row and Limit (groupings). // TODO: also allow aggregates once aggs on constants are supported. // C.f. https://github.com/elastic/elasticsearch/issues/100634 - if (p instanceof Filter || p instanceof Eval || p instanceof Row) { + if (p instanceof Filter || p instanceof Eval || p instanceof Row || p instanceof Limit) { p = p.transformExpressionsOnly(ReferenceAttribute.class, r -> builder.build().resolve(r, r)); } return p; diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneColumns.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneColumns.java index 5c51fb8a4be13..a7c28f89a3668 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneColumns.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneColumns.java @@ -69,7 +69,7 @@ private static LogicalPlan pruneColumns(LogicalPlan plan, AttributeSet.Builder u // TODO: revisit with every new command // skip nodes that simply pass the input through and use no references - if (p instanceof Limit || p instanceof Sample) { + if (p instanceof Limit limit && limit.groupings().isEmpty() || p instanceof Sample) { return p; } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneLiteralsInLimitBy.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneLiteralsInLimitBy.java new file mode 100644 index 0000000000000..cc8c77711a4ae --- /dev/null +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneLiteralsInLimitBy.java @@ -0,0 +1,46 @@ +/* + * 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.optimizer.rules.logical; + +import org.elasticsearch.xpack.esql.core.expression.Alias; +import org.elasticsearch.xpack.esql.core.expression.Expression; +import org.elasticsearch.xpack.esql.plan.logical.Limit; +import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; + +import java.util.ArrayList; +import java.util.List; + +/** + * Prune foldable groupings from {@code LIMIT BY}. A foldable expression evaluates to the same constant for every row, + * so it has no grouping effect. If all groupings are foldable the {@code LIMIT BY} degenerates to a plain {@code LIMIT}. + * Groupings arrive from the parser as either raw {@link org.elasticsearch.xpack.esql.core.expression.Attribute}s + * or {@link Alias} nodes wrapping the expression. {@link Alias#foldable()} is always {@code false}, + * so we unwrap to check the child. + */ +public final class PruneLiteralsInLimitBy extends OptimizerRules.OptimizerRule { + + @Override + protected LogicalPlan rule(Limit limit) { + if (limit.groupings().isEmpty()) { + return limit; + } + + List newGroupings = new ArrayList<>(); + for (Expression g : limit.groupings()) { + Expression toCheck = g instanceof Alias as ? as.child() : g; + if (toCheck.foldable() == false) { + newGroupings.add(g); + } + } + + if (newGroupings.size() == limit.groupings().size()) { + return limit; + } + return new Limit(limit.source(), limit.limit(), limit.child(), newGroupings, limit.duplicated(), limit.local()); + } +} diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimits.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimits.java index 8e1e5045aaccb..5b353144c2b62 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimits.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimits.java @@ -8,7 +8,10 @@ package org.elasticsearch.xpack.esql.optimizer.rules.logical; import org.elasticsearch.xpack.esql.core.expression.Alias; +import org.elasticsearch.xpack.esql.core.expression.Attribute; +import org.elasticsearch.xpack.esql.core.expression.Expression; import org.elasticsearch.xpack.esql.core.expression.FoldContext; +import org.elasticsearch.xpack.esql.core.expression.NameId; import org.elasticsearch.xpack.esql.core.util.Holder; import org.elasticsearch.xpack.esql.expression.function.fulltext.Score; import org.elasticsearch.xpack.esql.optimizer.LogicalOptimizerContext; @@ -31,7 +34,11 @@ import org.elasticsearch.xpack.esql.rule.Rule; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; + +import static org.elasticsearch.xpack.esql.core.expression.Expressions.listSemanticEquals; public final class PushDownAndCombineLimits extends OptimizerRules.ParameterizedOptimizerRule implements @@ -50,7 +57,7 @@ private PushDownAndCombineLimits(boolean local) { @Override public LogicalPlan rule(Limit limit, LogicalOptimizerContext ctx) { - if (limit.child() instanceof Limit childLimit) { + if (limit.child() instanceof Limit childLimit && listSemanticEquals(childLimit.groupings(), limit.groupings())) { return combineLimits(limit, childLimit, ctx.foldCtx()); } else if (limit.child() instanceof UnaryPlan unary) { if (unary instanceof Eval @@ -61,6 +68,8 @@ public LogicalPlan rule(Limit limit, LogicalOptimizerContext ctx) { if (false == local && unary instanceof Eval && evalAliasNeedsData((Eval) unary)) { // do not push down the limit through an eval that needs data (e.g. a score function) during initial planning return limit; + } else if (groupingsReferenceAttributeDefinedByChild(limit, unary)) { + return limit; } else { return unary.replaceChild(limit.replaceChild(unary.child())); } @@ -70,10 +79,12 @@ public LogicalPlan rule(Limit limit, LogicalOptimizerContext ctx) { // To avoid repeating this infinitely, we have to set duplicated = true. return duplicateLimitAsFirstGrandchild(limit, false); } else if (unary instanceof Enrich enrich) { + if (groupingsReferenceAttributeDefinedByChild(limit, enrich)) { + return limit; + } if (enrich.mode() == Enrich.Mode.REMOTE) { return duplicateLimitAsFirstGrandchild(limit, true); } else { - // We can push past local enrich because it does not increase the number of rows return enrich.replaceChild(limit.replaceChild(enrich.child())); } } @@ -82,7 +93,7 @@ public LogicalPlan rule(Limit limit, LogicalOptimizerContext ctx) { // this applies for cases such as | limit 1 | sort field | limit 10 else { Limit descendantLimit = descendantLimit(unary); - if (descendantLimit != null) { + if (descendantLimit != null && descendantLimit.groupings().isEmpty()) { var l1 = (int) limit.limit().fold(ctx.foldCtx()); var l2 = (int) descendantLimit.limit().fold(ctx.foldCtx()); if (l2 <= l1) { @@ -100,7 +111,7 @@ public LogicalPlan rule(Limit limit, LogicalOptimizerContext ctx) { // And the verifier checks that there are no non-synthetic limits before the join. // TODO: However, this means that the non-remote join will be always forced on the coordinator. We may want to revisit this. return duplicateLimitAsFirstGrandchild(limit, false); - } else if (limit.child() instanceof Fork fork) { + } else if (limit.child() instanceof Fork fork && limit.groupings().isEmpty()) { return maybePushDownLimitToFork(limit, fork, ctx); } return limit; @@ -163,7 +174,7 @@ private static Limit combineLimits(Limit upper, Limit lower, FoldContext ctx) { // If any of them is local, we want the local limit return lower.local() ? lower : lower.withLocal(upper.local()); } else { - return new Limit(upper.source(), upper.limit(), lower.child(), upper.duplicated(), upper.local()); + return new Limit(upper.source(), upper.limit(), lower.child(), upper.groupings(), upper.duplicated(), upper.local()); } } @@ -183,14 +194,35 @@ private boolean evalAliasNeedsData(Eval eval) { } /** - * Checks the existence of another 'visible' Limit, that exists behind an operation that doesn't produce output more data than - * its input (that is not a relation/source nor aggregation). + * Returns {@code true} if any attribute referenced by the limit's groupings is defined by the child node + * (i.e. present in the child's output but absent from the grandchild's output). Pushing a grouped limit + * past such a child would leave the grouping attribute unresolved. + */ + private static boolean groupingsReferenceAttributeDefinedByChild(Limit limit, UnaryPlan child) { + if (limit.groupings().isEmpty()) { + return false; + } + Set grandchildIds = new HashSet<>(); + for (Attribute a : child.child().output()) { + grandchildIds.add(a.id()); + } + for (Expression g : limit.groupings()) { + if (g instanceof Attribute a && grandchildIds.contains(a.id()) == false) { + return true; + } + } + return false; + } + + /** + * Checks the existence of another 'visible' non-grouping Limit, that exists behind an operation that doesn't produce more output data + * than its input (that is not a relation/source nor aggregation). * P.S. Typically an aggregation produces less data than the input. */ private static Limit descendantLimit(UnaryPlan unary) { UnaryPlan plan = unary; while (plan instanceof Aggregate == false) { - if (plan instanceof Limit limit) { + if (plan instanceof Limit limit && limit.groupings().isEmpty()) { return limit; } else if (plan instanceof MvExpand) { // the limit that applies to mv_expand shouldn't be changed diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/ReplaceLimitByExpressionWithEval.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/ReplaceLimitByExpressionWithEval.java new file mode 100644 index 0000000000000..bb7351f885a63 --- /dev/null +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/ReplaceLimitByExpressionWithEval.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.optimizer.rules.logical; + +import org.elasticsearch.xpack.esql.core.expression.Alias; +import org.elasticsearch.xpack.esql.core.expression.Attribute; +import org.elasticsearch.xpack.esql.core.expression.Expression; +import org.elasticsearch.xpack.esql.plan.logical.Eval; +import org.elasticsearch.xpack.esql.plan.logical.Limit; +import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; +import org.elasticsearch.xpack.esql.plan.logical.Project; + +import java.util.ArrayList; +import java.util.List; + +import static org.elasticsearch.xpack.esql.core.expression.Attribute.rawTemporaryName; + +/** + * Extract non-attribute {@link Limit} grouping expressions into a synthetic {@link Eval}. + *

+ * For example, {@code LIMIT N BY languages * 2} becomes + * {@code EVAL $$limit_by_0 = languages * 2 | LIMIT N BY $$limit_by_0}. + * {@link PushDownEval} in the operators batch takes care of pushing the Eval below any + * {@link org.elasticsearch.xpack.esql.plan.logical.OrderBy} if present. + *

+ * Foldable groupings are pruned separately by {@link PruneLiteralsInLimitBy} in the operators batch. + */ +public final class ReplaceLimitByExpressionWithEval extends OptimizerRules.OptimizerRule { + + @Override + protected LogicalPlan rule(Limit limit) { + if (limit.groupings().isEmpty()) { + return limit; + } + + int counter = 0; + int size = limit.groupings().size(); + List newGroupings = new ArrayList<>(limit.groupings()); + List evals = new ArrayList<>(size); + + for (int i = 0; i < size; i++) { + Expression g = newGroupings.get(i); + Expression underlying = g instanceof Alias as ? as.child() : g; + if (underlying.foldable()) { + // Foldable expressions are left as-is; PruneLiteralsInLimitBy will prune them in the operators batch. + continue; + } + if (g instanceof Alias as) { + evals.add(as); + newGroupings.set(i, as.toAttribute()); + } else if (g instanceof Attribute == false) { + var name = rawTemporaryName("LIMIT BY", String.valueOf(i), String.valueOf(counter++)); + var alias = new Alias(g.source(), name, g, null, true); + evals.add(alias); + newGroupings.set(i, alias.toAttribute()); + } + } + + if (evals.isEmpty()) { + return limit; + } + + var originalOutput = limit.output(); + var evalChild = new Eval(limit.source(), limit.child(), evals); + var newLimit = new Limit(limit.source(), limit.limit(), evalChild, newGroupings, limit.duplicated(), limit.local()); + return new Project(limit.source(), newLimit, originalOutput); + } +} diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/PushLimitToSource.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/PushLimitToSource.java index a6d3d5c1d537f..0f6b72f9bc528 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/PushLimitToSource.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/PushLimitToSource.java @@ -16,6 +16,9 @@ public class PushLimitToSource extends PhysicalOptimizerRules.OptimizerRule { @Override protected PhysicalPlan rule(LimitExec limitExec) { + if (limitExec.groupings().isEmpty() == false) { + return limitExec; + } PhysicalPlan plan = limitExec; PhysicalPlan child = limitExec.child(); if (child instanceof EsQueryExec queryExec) { // add_task_parallelism_above_query: false 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 c0ba3c950fab1..521716b5cd644 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 @@ -379,6 +379,7 @@ doubleParameter identifierOrParameter stringOrParameter limitCommand +limitByGroupKey sortCommand orderExpression keepCommand @@ -456,4 +457,4 @@ promqlIndexString atn: -[4, 1, 168, 1112, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 1, 0, 5, 0, 226, 8, 0, 10, 0, 12, 0, 229, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 243, 8, 2, 10, 2, 12, 2, 246, 9, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 257, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 288, 8, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 301, 8, 8, 10, 8, 12, 8, 304, 9, 8, 1, 9, 1, 9, 1, 9, 3, 9, 309, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 5, 13, 326, 8, 13, 10, 13, 12, 13, 329, 9, 13, 1, 13, 3, 13, 332, 8, 13, 1, 14, 1, 14, 1, 14, 3, 14, 337, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 343, 8, 15, 10, 15, 12, 15, 346, 9, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 3, 16, 353, 8, 16, 1, 16, 1, 16, 1, 16, 3, 16, 358, 8, 16, 1, 16, 3, 16, 361, 8, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 375, 8, 21, 10, 21, 12, 21, 378, 9, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 385, 8, 23, 1, 23, 1, 23, 3, 23, 389, 8, 23, 1, 24, 1, 24, 1, 24, 5, 24, 394, 8, 24, 10, 24, 12, 24, 397, 9, 24, 1, 25, 1, 25, 1, 25, 3, 25, 402, 8, 25, 1, 26, 1, 26, 1, 26, 3, 26, 407, 8, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 416, 8, 26, 1, 27, 1, 27, 1, 27, 5, 27, 421, 8, 27, 10, 27, 12, 27, 424, 9, 27, 1, 28, 1, 28, 1, 28, 3, 28, 429, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 438, 8, 28, 1, 29, 1, 29, 1, 29, 5, 29, 443, 8, 29, 10, 29, 12, 29, 446, 9, 29, 1, 30, 1, 30, 1, 30, 5, 30, 451, 8, 30, 10, 30, 12, 30, 454, 9, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 3, 32, 461, 8, 32, 1, 33, 1, 33, 3, 33, 465, 8, 33, 1, 34, 1, 34, 3, 34, 469, 8, 34, 1, 35, 1, 35, 1, 35, 3, 35, 474, 8, 35, 1, 36, 1, 36, 3, 36, 478, 8, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 5, 38, 487, 8, 38, 10, 38, 12, 38, 490, 9, 38, 1, 39, 1, 39, 3, 39, 494, 8, 39, 1, 39, 1, 39, 3, 39, 498, 8, 39, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 5, 42, 510, 8, 42, 10, 42, 12, 42, 513, 9, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 523, 8, 43, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 529, 8, 44, 1, 45, 1, 45, 1, 45, 5, 45, 534, 8, 45, 10, 45, 12, 45, 537, 9, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 3, 47, 545, 8, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 552, 8, 48, 10, 48, 12, 48, 555, 9, 48, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 574, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 580, 8, 53, 10, 53, 12, 53, 583, 9, 53, 3, 53, 585, 8, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 3, 55, 592, 8, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 603, 8, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 610, 8, 57, 1, 58, 1, 58, 1, 58, 1, 59, 4, 59, 616, 8, 59, 11, 59, 12, 59, 617, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 630, 8, 61, 10, 61, 12, 61, 633, 9, 61, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 641, 8, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 3, 64, 652, 8, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 662, 8, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 668, 8, 65, 3, 65, 670, 8, 65, 1, 66, 1, 66, 3, 66, 674, 8, 66, 1, 66, 5, 66, 677, 8, 66, 10, 66, 12, 66, 680, 9, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 693, 8, 67, 1, 68, 1, 68, 1, 68, 5, 68, 698, 8, 68, 10, 68, 12, 68, 701, 9, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 3, 76, 733, 8, 76, 1, 77, 1, 77, 3, 77, 737, 8, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 3, 78, 747, 8, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 3, 79, 756, 8, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 5, 79, 763, 8, 79, 10, 79, 12, 79, 766, 9, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 3, 79, 773, 8, 79, 1, 79, 1, 79, 1, 79, 3, 79, 778, 8, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 5, 79, 786, 8, 79, 10, 79, 12, 79, 789, 9, 79, 1, 80, 1, 80, 3, 80, 793, 8, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 3, 80, 800, 8, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 3, 80, 807, 8, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 5, 80, 814, 8, 80, 10, 80, 12, 80, 817, 9, 80, 1, 80, 1, 80, 1, 80, 1, 80, 3, 80, 823, 8, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 5, 80, 830, 8, 80, 10, 80, 12, 80, 833, 9, 80, 1, 80, 1, 80, 3, 80, 837, 8, 80, 1, 81, 1, 81, 1, 81, 3, 81, 842, 8, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 3, 82, 852, 8, 82, 1, 83, 1, 83, 1, 83, 1, 83, 3, 83, 858, 8, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 5, 83, 866, 8, 83, 10, 83, 12, 83, 869, 9, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 3, 84, 879, 8, 84, 1, 84, 1, 84, 1, 84, 5, 84, 884, 8, 84, 10, 84, 12, 84, 887, 9, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 5, 85, 895, 8, 85, 10, 85, 12, 85, 898, 9, 85, 1, 85, 1, 85, 3, 85, 902, 8, 85, 3, 85, 904, 8, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 3, 86, 911, 8, 86, 1, 87, 1, 87, 1, 87, 1, 87, 5, 87, 917, 8, 87, 10, 87, 12, 87, 920, 9, 87, 3, 87, 922, 8, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 3, 89, 932, 8, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 5, 90, 947, 8, 90, 10, 90, 12, 90, 950, 9, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 5, 90, 958, 8, 90, 10, 90, 12, 90, 961, 9, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 5, 90, 969, 8, 90, 10, 90, 12, 90, 972, 9, 90, 1, 90, 1, 90, 3, 90, 976, 8, 90, 1, 91, 1, 91, 1, 92, 1, 92, 3, 92, 982, 8, 92, 1, 93, 3, 93, 985, 8, 93, 1, 93, 1, 93, 1, 94, 3, 94, 990, 8, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 3, 98, 1006, 8, 98, 1, 98, 1, 98, 1, 98, 3, 98, 1011, 8, 98, 1, 99, 1, 99, 1, 99, 1, 99, 5, 99, 1017, 8, 99, 10, 99, 12, 99, 1020, 9, 99, 1, 100, 1, 100, 5, 100, 1024, 8, 100, 10, 100, 12, 100, 1027, 9, 100, 1, 100, 1, 100, 1, 100, 3, 100, 1032, 8, 100, 1, 100, 1, 100, 4, 100, 1036, 8, 100, 11, 100, 12, 100, 1037, 1, 100, 1, 100, 1, 100, 1, 100, 5, 100, 1044, 8, 100, 10, 100, 12, 100, 1047, 9, 100, 1, 100, 4, 100, 1050, 8, 100, 11, 100, 12, 100, 1051, 3, 100, 1054, 8, 100, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, 5, 104, 1067, 8, 104, 10, 104, 12, 104, 1070, 9, 104, 1, 104, 1, 104, 3, 104, 1074, 8, 104, 1, 105, 1, 105, 1, 106, 4, 106, 1079, 8, 106, 11, 106, 12, 106, 1080, 1, 106, 1, 106, 5, 106, 1085, 8, 106, 10, 106, 12, 106, 1088, 9, 106, 1, 106, 3, 106, 1091, 8, 106, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 3, 107, 1102, 8, 107, 1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 0, 5, 4, 122, 158, 166, 168, 112, 0, 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, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 0, 14, 2, 0, 58, 58, 113, 113, 1, 0, 107, 108, 2, 0, 62, 62, 69, 69, 2, 0, 72, 72, 75, 75, 2, 0, 47, 47, 58, 58, 1, 0, 93, 94, 1, 0, 95, 97, 2, 0, 71, 71, 84, 84, 2, 0, 86, 86, 88, 92, 2, 0, 29, 29, 31, 32, 3, 0, 58, 58, 101, 101, 107, 108, 8, 0, 58, 58, 63, 63, 65, 66, 68, 68, 101, 101, 107, 108, 113, 113, 155, 157, 2, 0, 107, 107, 113, 113, 3, 0, 58, 58, 107, 107, 113, 113, 1161, 0, 227, 1, 0, 0, 0, 2, 233, 1, 0, 0, 0, 4, 236, 1, 0, 0, 0, 6, 256, 1, 0, 0, 0, 8, 287, 1, 0, 0, 0, 10, 289, 1, 0, 0, 0, 12, 292, 1, 0, 0, 0, 14, 294, 1, 0, 0, 0, 16, 297, 1, 0, 0, 0, 18, 308, 1, 0, 0, 0, 20, 312, 1, 0, 0, 0, 22, 315, 1, 0, 0, 0, 24, 318, 1, 0, 0, 0, 26, 322, 1, 0, 0, 0, 28, 336, 1, 0, 0, 0, 30, 338, 1, 0, 0, 0, 32, 360, 1, 0, 0, 0, 34, 362, 1, 0, 0, 0, 36, 364, 1, 0, 0, 0, 38, 366, 1, 0, 0, 0, 40, 368, 1, 0, 0, 0, 42, 370, 1, 0, 0, 0, 44, 379, 1, 0, 0, 0, 46, 382, 1, 0, 0, 0, 48, 390, 1, 0, 0, 0, 50, 398, 1, 0, 0, 0, 52, 415, 1, 0, 0, 0, 54, 417, 1, 0, 0, 0, 56, 437, 1, 0, 0, 0, 58, 439, 1, 0, 0, 0, 60, 447, 1, 0, 0, 0, 62, 455, 1, 0, 0, 0, 64, 460, 1, 0, 0, 0, 66, 464, 1, 0, 0, 0, 68, 468, 1, 0, 0, 0, 70, 473, 1, 0, 0, 0, 72, 477, 1, 0, 0, 0, 74, 479, 1, 0, 0, 0, 76, 482, 1, 0, 0, 0, 78, 491, 1, 0, 0, 0, 80, 499, 1, 0, 0, 0, 82, 502, 1, 0, 0, 0, 84, 505, 1, 0, 0, 0, 86, 522, 1, 0, 0, 0, 88, 524, 1, 0, 0, 0, 90, 530, 1, 0, 0, 0, 92, 538, 1, 0, 0, 0, 94, 544, 1, 0, 0, 0, 96, 546, 1, 0, 0, 0, 98, 556, 1, 0, 0, 0, 100, 559, 1, 0, 0, 0, 102, 562, 1, 0, 0, 0, 104, 566, 1, 0, 0, 0, 106, 569, 1, 0, 0, 0, 108, 586, 1, 0, 0, 0, 110, 591, 1, 0, 0, 0, 112, 595, 1, 0, 0, 0, 114, 598, 1, 0, 0, 0, 116, 611, 1, 0, 0, 0, 118, 615, 1, 0, 0, 0, 120, 619, 1, 0, 0, 0, 122, 623, 1, 0, 0, 0, 124, 634, 1, 0, 0, 0, 126, 636, 1, 0, 0, 0, 128, 647, 1, 0, 0, 0, 130, 669, 1, 0, 0, 0, 132, 671, 1, 0, 0, 0, 134, 692, 1, 0, 0, 0, 136, 694, 1, 0, 0, 0, 138, 702, 1, 0, 0, 0, 140, 704, 1, 0, 0, 0, 142, 706, 1, 0, 0, 0, 144, 711, 1, 0, 0, 0, 146, 714, 1, 0, 0, 0, 148, 719, 1, 0, 0, 0, 150, 724, 1, 0, 0, 0, 152, 728, 1, 0, 0, 0, 154, 734, 1, 0, 0, 0, 156, 746, 1, 0, 0, 0, 158, 777, 1, 0, 0, 0, 160, 836, 1, 0, 0, 0, 162, 838, 1, 0, 0, 0, 164, 851, 1, 0, 0, 0, 166, 857, 1, 0, 0, 0, 168, 878, 1, 0, 0, 0, 170, 888, 1, 0, 0, 0, 172, 910, 1, 0, 0, 0, 174, 912, 1, 0, 0, 0, 176, 925, 1, 0, 0, 0, 178, 931, 1, 0, 0, 0, 180, 975, 1, 0, 0, 0, 182, 977, 1, 0, 0, 0, 184, 981, 1, 0, 0, 0, 186, 984, 1, 0, 0, 0, 188, 989, 1, 0, 0, 0, 190, 993, 1, 0, 0, 0, 192, 995, 1, 0, 0, 0, 194, 997, 1, 0, 0, 0, 196, 1010, 1, 0, 0, 0, 198, 1012, 1, 0, 0, 0, 200, 1053, 1, 0, 0, 0, 202, 1055, 1, 0, 0, 0, 204, 1057, 1, 0, 0, 0, 206, 1061, 1, 0, 0, 0, 208, 1073, 1, 0, 0, 0, 210, 1075, 1, 0, 0, 0, 212, 1090, 1, 0, 0, 0, 214, 1101, 1, 0, 0, 0, 216, 1103, 1, 0, 0, 0, 218, 1105, 1, 0, 0, 0, 220, 1107, 1, 0, 0, 0, 222, 1109, 1, 0, 0, 0, 224, 226, 3, 150, 75, 0, 225, 224, 1, 0, 0, 0, 226, 229, 1, 0, 0, 0, 227, 225, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 230, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 230, 231, 3, 2, 1, 0, 231, 232, 5, 0, 0, 1, 232, 1, 1, 0, 0, 0, 233, 234, 3, 4, 2, 0, 234, 235, 5, 0, 0, 1, 235, 3, 1, 0, 0, 0, 236, 237, 6, 2, -1, 0, 237, 238, 3, 6, 3, 0, 238, 244, 1, 0, 0, 0, 239, 240, 10, 1, 0, 0, 240, 241, 5, 57, 0, 0, 241, 243, 3, 8, 4, 0, 242, 239, 1, 0, 0, 0, 243, 246, 1, 0, 0, 0, 244, 242, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 5, 1, 0, 0, 0, 246, 244, 1, 0, 0, 0, 247, 257, 3, 20, 10, 0, 248, 257, 3, 14, 7, 0, 249, 257, 3, 104, 52, 0, 250, 257, 3, 22, 11, 0, 251, 257, 3, 200, 100, 0, 252, 253, 4, 3, 1, 0, 253, 257, 3, 100, 50, 0, 254, 255, 4, 3, 2, 0, 255, 257, 3, 24, 12, 0, 256, 247, 1, 0, 0, 0, 256, 248, 1, 0, 0, 0, 256, 249, 1, 0, 0, 0, 256, 250, 1, 0, 0, 0, 256, 251, 1, 0, 0, 0, 256, 252, 1, 0, 0, 0, 256, 254, 1, 0, 0, 0, 257, 7, 1, 0, 0, 0, 258, 288, 3, 44, 22, 0, 259, 288, 3, 10, 5, 0, 260, 288, 3, 80, 40, 0, 261, 288, 3, 74, 37, 0, 262, 288, 3, 46, 23, 0, 263, 288, 3, 76, 38, 0, 264, 288, 3, 82, 41, 0, 265, 288, 3, 84, 42, 0, 266, 288, 3, 88, 44, 0, 267, 288, 3, 96, 48, 0, 268, 288, 3, 106, 53, 0, 269, 288, 3, 98, 49, 0, 270, 288, 3, 194, 97, 0, 271, 288, 3, 114, 57, 0, 272, 288, 3, 128, 64, 0, 273, 288, 3, 112, 56, 0, 274, 288, 3, 116, 58, 0, 275, 288, 3, 126, 63, 0, 276, 288, 3, 130, 65, 0, 277, 288, 3, 132, 66, 0, 278, 288, 3, 146, 73, 0, 279, 288, 3, 138, 69, 0, 280, 288, 3, 148, 74, 0, 281, 288, 3, 140, 70, 0, 282, 288, 3, 154, 77, 0, 283, 284, 4, 4, 3, 0, 284, 288, 3, 142, 71, 0, 285, 286, 4, 4, 4, 0, 286, 288, 3, 144, 72, 0, 287, 258, 1, 0, 0, 0, 287, 259, 1, 0, 0, 0, 287, 260, 1, 0, 0, 0, 287, 261, 1, 0, 0, 0, 287, 262, 1, 0, 0, 0, 287, 263, 1, 0, 0, 0, 287, 264, 1, 0, 0, 0, 287, 265, 1, 0, 0, 0, 287, 266, 1, 0, 0, 0, 287, 267, 1, 0, 0, 0, 287, 268, 1, 0, 0, 0, 287, 269, 1, 0, 0, 0, 287, 270, 1, 0, 0, 0, 287, 271, 1, 0, 0, 0, 287, 272, 1, 0, 0, 0, 287, 273, 1, 0, 0, 0, 287, 274, 1, 0, 0, 0, 287, 275, 1, 0, 0, 0, 287, 276, 1, 0, 0, 0, 287, 277, 1, 0, 0, 0, 287, 278, 1, 0, 0, 0, 287, 279, 1, 0, 0, 0, 287, 280, 1, 0, 0, 0, 287, 281, 1, 0, 0, 0, 287, 282, 1, 0, 0, 0, 287, 283, 1, 0, 0, 0, 287, 285, 1, 0, 0, 0, 288, 9, 1, 0, 0, 0, 289, 290, 5, 17, 0, 0, 290, 291, 3, 158, 79, 0, 291, 11, 1, 0, 0, 0, 292, 293, 3, 62, 31, 0, 293, 13, 1, 0, 0, 0, 294, 295, 5, 13, 0, 0, 295, 296, 3, 16, 8, 0, 296, 15, 1, 0, 0, 0, 297, 302, 3, 18, 9, 0, 298, 299, 5, 68, 0, 0, 299, 301, 3, 18, 9, 0, 300, 298, 1, 0, 0, 0, 301, 304, 1, 0, 0, 0, 302, 300, 1, 0, 0, 0, 302, 303, 1, 0, 0, 0, 303, 17, 1, 0, 0, 0, 304, 302, 1, 0, 0, 0, 305, 306, 3, 52, 26, 0, 306, 307, 5, 63, 0, 0, 307, 309, 1, 0, 0, 0, 308, 305, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310, 1, 0, 0, 0, 310, 311, 3, 158, 79, 0, 311, 19, 1, 0, 0, 0, 312, 313, 5, 22, 0, 0, 313, 314, 3, 26, 13, 0, 314, 21, 1, 0, 0, 0, 315, 316, 5, 23, 0, 0, 316, 317, 3, 26, 13, 0, 317, 23, 1, 0, 0, 0, 318, 319, 5, 24, 0, 0, 319, 320, 3, 72, 36, 0, 320, 321, 3, 94, 47, 0, 321, 25, 1, 0, 0, 0, 322, 327, 3, 28, 14, 0, 323, 324, 5, 68, 0, 0, 324, 326, 3, 28, 14, 0, 325, 323, 1, 0, 0, 0, 326, 329, 1, 0, 0, 0, 327, 325, 1, 0, 0, 0, 327, 328, 1, 0, 0, 0, 328, 331, 1, 0, 0, 0, 329, 327, 1, 0, 0, 0, 330, 332, 3, 42, 21, 0, 331, 330, 1, 0, 0, 0, 331, 332, 1, 0, 0, 0, 332, 27, 1, 0, 0, 0, 333, 337, 3, 32, 16, 0, 334, 335, 4, 14, 5, 0, 335, 337, 3, 30, 15, 0, 336, 333, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 337, 29, 1, 0, 0, 0, 338, 339, 5, 105, 0, 0, 339, 344, 3, 20, 10, 0, 340, 341, 5, 57, 0, 0, 341, 343, 3, 8, 4, 0, 342, 340, 1, 0, 0, 0, 343, 346, 1, 0, 0, 0, 344, 342, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 347, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 347, 348, 5, 106, 0, 0, 348, 31, 1, 0, 0, 0, 349, 350, 3, 34, 17, 0, 350, 351, 5, 66, 0, 0, 351, 353, 1, 0, 0, 0, 352, 349, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 357, 3, 38, 19, 0, 355, 356, 5, 65, 0, 0, 356, 358, 3, 36, 18, 0, 357, 355, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 361, 1, 0, 0, 0, 359, 361, 3, 40, 20, 0, 360, 352, 1, 0, 0, 0, 360, 359, 1, 0, 0, 0, 361, 33, 1, 0, 0, 0, 362, 363, 5, 113, 0, 0, 363, 35, 1, 0, 0, 0, 364, 365, 5, 113, 0, 0, 365, 37, 1, 0, 0, 0, 366, 367, 5, 113, 0, 0, 367, 39, 1, 0, 0, 0, 368, 369, 7, 0, 0, 0, 369, 41, 1, 0, 0, 0, 370, 371, 5, 112, 0, 0, 371, 376, 5, 113, 0, 0, 372, 373, 5, 68, 0, 0, 373, 375, 5, 113, 0, 0, 374, 372, 1, 0, 0, 0, 375, 378, 1, 0, 0, 0, 376, 374, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 43, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 379, 380, 5, 9, 0, 0, 380, 381, 3, 16, 8, 0, 381, 45, 1, 0, 0, 0, 382, 384, 5, 16, 0, 0, 383, 385, 3, 48, 24, 0, 384, 383, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 388, 1, 0, 0, 0, 386, 387, 5, 64, 0, 0, 387, 389, 3, 16, 8, 0, 388, 386, 1, 0, 0, 0, 388, 389, 1, 0, 0, 0, 389, 47, 1, 0, 0, 0, 390, 395, 3, 50, 25, 0, 391, 392, 5, 68, 0, 0, 392, 394, 3, 50, 25, 0, 393, 391, 1, 0, 0, 0, 394, 397, 1, 0, 0, 0, 395, 393, 1, 0, 0, 0, 395, 396, 1, 0, 0, 0, 396, 49, 1, 0, 0, 0, 397, 395, 1, 0, 0, 0, 398, 401, 3, 18, 9, 0, 399, 400, 5, 17, 0, 0, 400, 402, 3, 158, 79, 0, 401, 399, 1, 0, 0, 0, 401, 402, 1, 0, 0, 0, 402, 51, 1, 0, 0, 0, 403, 404, 4, 26, 6, 0, 404, 406, 5, 103, 0, 0, 405, 407, 5, 107, 0, 0, 406, 405, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 409, 5, 104, 0, 0, 409, 410, 5, 70, 0, 0, 410, 411, 5, 103, 0, 0, 411, 412, 3, 54, 27, 0, 412, 413, 5, 104, 0, 0, 413, 416, 1, 0, 0, 0, 414, 416, 3, 54, 27, 0, 415, 403, 1, 0, 0, 0, 415, 414, 1, 0, 0, 0, 416, 53, 1, 0, 0, 0, 417, 422, 3, 70, 35, 0, 418, 419, 5, 70, 0, 0, 419, 421, 3, 70, 35, 0, 420, 418, 1, 0, 0, 0, 421, 424, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 422, 423, 1, 0, 0, 0, 423, 55, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 425, 426, 4, 28, 7, 0, 426, 428, 5, 103, 0, 0, 427, 429, 5, 148, 0, 0, 428, 427, 1, 0, 0, 0, 428, 429, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 431, 5, 104, 0, 0, 431, 432, 5, 70, 0, 0, 432, 433, 5, 103, 0, 0, 433, 434, 3, 58, 29, 0, 434, 435, 5, 104, 0, 0, 435, 438, 1, 0, 0, 0, 436, 438, 3, 58, 29, 0, 437, 425, 1, 0, 0, 0, 437, 436, 1, 0, 0, 0, 438, 57, 1, 0, 0, 0, 439, 444, 3, 64, 32, 0, 440, 441, 5, 70, 0, 0, 441, 443, 3, 64, 32, 0, 442, 440, 1, 0, 0, 0, 443, 446, 1, 0, 0, 0, 444, 442, 1, 0, 0, 0, 444, 445, 1, 0, 0, 0, 445, 59, 1, 0, 0, 0, 446, 444, 1, 0, 0, 0, 447, 452, 3, 56, 28, 0, 448, 449, 5, 68, 0, 0, 449, 451, 3, 56, 28, 0, 450, 448, 1, 0, 0, 0, 451, 454, 1, 0, 0, 0, 452, 450, 1, 0, 0, 0, 452, 453, 1, 0, 0, 0, 453, 61, 1, 0, 0, 0, 454, 452, 1, 0, 0, 0, 455, 456, 7, 1, 0, 0, 456, 63, 1, 0, 0, 0, 457, 461, 5, 148, 0, 0, 458, 461, 3, 66, 33, 0, 459, 461, 3, 68, 34, 0, 460, 457, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 459, 1, 0, 0, 0, 461, 65, 1, 0, 0, 0, 462, 465, 5, 82, 0, 0, 463, 465, 5, 101, 0, 0, 464, 462, 1, 0, 0, 0, 464, 463, 1, 0, 0, 0, 465, 67, 1, 0, 0, 0, 466, 469, 5, 100, 0, 0, 467, 469, 5, 102, 0, 0, 468, 466, 1, 0, 0, 0, 468, 467, 1, 0, 0, 0, 469, 69, 1, 0, 0, 0, 470, 474, 3, 62, 31, 0, 471, 474, 3, 66, 33, 0, 472, 474, 3, 68, 34, 0, 473, 470, 1, 0, 0, 0, 473, 471, 1, 0, 0, 0, 473, 472, 1, 0, 0, 0, 474, 71, 1, 0, 0, 0, 475, 478, 3, 190, 95, 0, 476, 478, 3, 66, 33, 0, 477, 475, 1, 0, 0, 0, 477, 476, 1, 0, 0, 0, 478, 73, 1, 0, 0, 0, 479, 480, 5, 11, 0, 0, 480, 481, 3, 180, 90, 0, 481, 75, 1, 0, 0, 0, 482, 483, 5, 15, 0, 0, 483, 488, 3, 78, 39, 0, 484, 485, 5, 68, 0, 0, 485, 487, 3, 78, 39, 0, 486, 484, 1, 0, 0, 0, 487, 490, 1, 0, 0, 0, 488, 486, 1, 0, 0, 0, 488, 489, 1, 0, 0, 0, 489, 77, 1, 0, 0, 0, 490, 488, 1, 0, 0, 0, 491, 493, 3, 158, 79, 0, 492, 494, 7, 2, 0, 0, 493, 492, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 497, 1, 0, 0, 0, 495, 496, 5, 79, 0, 0, 496, 498, 7, 3, 0, 0, 497, 495, 1, 0, 0, 0, 497, 498, 1, 0, 0, 0, 498, 79, 1, 0, 0, 0, 499, 500, 5, 37, 0, 0, 500, 501, 3, 60, 30, 0, 501, 81, 1, 0, 0, 0, 502, 503, 5, 36, 0, 0, 503, 504, 3, 60, 30, 0, 504, 83, 1, 0, 0, 0, 505, 506, 5, 40, 0, 0, 506, 511, 3, 86, 43, 0, 507, 508, 5, 68, 0, 0, 508, 510, 3, 86, 43, 0, 509, 507, 1, 0, 0, 0, 510, 513, 1, 0, 0, 0, 511, 509, 1, 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 85, 1, 0, 0, 0, 513, 511, 1, 0, 0, 0, 514, 515, 3, 56, 28, 0, 515, 516, 5, 158, 0, 0, 516, 517, 3, 56, 28, 0, 517, 523, 1, 0, 0, 0, 518, 519, 3, 56, 28, 0, 519, 520, 5, 63, 0, 0, 520, 521, 3, 56, 28, 0, 521, 523, 1, 0, 0, 0, 522, 514, 1, 0, 0, 0, 522, 518, 1, 0, 0, 0, 523, 87, 1, 0, 0, 0, 524, 525, 5, 8, 0, 0, 525, 526, 3, 168, 84, 0, 526, 528, 3, 190, 95, 0, 527, 529, 3, 90, 45, 0, 528, 527, 1, 0, 0, 0, 528, 529, 1, 0, 0, 0, 529, 89, 1, 0, 0, 0, 530, 535, 3, 92, 46, 0, 531, 532, 5, 68, 0, 0, 532, 534, 3, 92, 46, 0, 533, 531, 1, 0, 0, 0, 534, 537, 1, 0, 0, 0, 535, 533, 1, 0, 0, 0, 535, 536, 1, 0, 0, 0, 536, 91, 1, 0, 0, 0, 537, 535, 1, 0, 0, 0, 538, 539, 3, 62, 31, 0, 539, 540, 5, 63, 0, 0, 540, 541, 3, 180, 90, 0, 541, 93, 1, 0, 0, 0, 542, 543, 5, 85, 0, 0, 543, 545, 3, 174, 87, 0, 544, 542, 1, 0, 0, 0, 544, 545, 1, 0, 0, 0, 545, 95, 1, 0, 0, 0, 546, 547, 5, 10, 0, 0, 547, 548, 3, 168, 84, 0, 548, 553, 3, 190, 95, 0, 549, 550, 5, 68, 0, 0, 550, 552, 3, 190, 95, 0, 551, 549, 1, 0, 0, 0, 552, 555, 1, 0, 0, 0, 553, 551, 1, 0, 0, 0, 553, 554, 1, 0, 0, 0, 554, 97, 1, 0, 0, 0, 555, 553, 1, 0, 0, 0, 556, 557, 5, 35, 0, 0, 557, 558, 3, 52, 26, 0, 558, 99, 1, 0, 0, 0, 559, 560, 5, 6, 0, 0, 560, 561, 3, 102, 51, 0, 561, 101, 1, 0, 0, 0, 562, 563, 5, 105, 0, 0, 563, 564, 3, 4, 2, 0, 564, 565, 5, 106, 0, 0, 565, 103, 1, 0, 0, 0, 566, 567, 5, 42, 0, 0, 567, 568, 5, 165, 0, 0, 568, 105, 1, 0, 0, 0, 569, 570, 5, 5, 0, 0, 570, 573, 3, 108, 54, 0, 571, 572, 5, 80, 0, 0, 572, 574, 3, 56, 28, 0, 573, 571, 1, 0, 0, 0, 573, 574, 1, 0, 0, 0, 574, 584, 1, 0, 0, 0, 575, 576, 5, 85, 0, 0, 576, 581, 3, 110, 55, 0, 577, 578, 5, 68, 0, 0, 578, 580, 3, 110, 55, 0, 579, 577, 1, 0, 0, 0, 580, 583, 1, 0, 0, 0, 581, 579, 1, 0, 0, 0, 581, 582, 1, 0, 0, 0, 582, 585, 1, 0, 0, 0, 583, 581, 1, 0, 0, 0, 584, 575, 1, 0, 0, 0, 584, 585, 1, 0, 0, 0, 585, 107, 1, 0, 0, 0, 586, 587, 7, 4, 0, 0, 587, 109, 1, 0, 0, 0, 588, 589, 3, 56, 28, 0, 589, 590, 5, 63, 0, 0, 590, 592, 1, 0, 0, 0, 591, 588, 1, 0, 0, 0, 591, 592, 1, 0, 0, 0, 592, 593, 1, 0, 0, 0, 593, 594, 3, 56, 28, 0, 594, 111, 1, 0, 0, 0, 595, 596, 5, 14, 0, 0, 596, 597, 3, 180, 90, 0, 597, 113, 1, 0, 0, 0, 598, 599, 5, 4, 0, 0, 599, 602, 3, 52, 26, 0, 600, 601, 5, 80, 0, 0, 601, 603, 3, 52, 26, 0, 602, 600, 1, 0, 0, 0, 602, 603, 1, 0, 0, 0, 603, 609, 1, 0, 0, 0, 604, 605, 5, 158, 0, 0, 605, 606, 3, 52, 26, 0, 606, 607, 5, 68, 0, 0, 607, 608, 3, 52, 26, 0, 608, 610, 1, 0, 0, 0, 609, 604, 1, 0, 0, 0, 609, 610, 1, 0, 0, 0, 610, 115, 1, 0, 0, 0, 611, 612, 5, 25, 0, 0, 612, 613, 3, 118, 59, 0, 613, 117, 1, 0, 0, 0, 614, 616, 3, 120, 60, 0, 615, 614, 1, 0, 0, 0, 616, 617, 1, 0, 0, 0, 617, 615, 1, 0, 0, 0, 617, 618, 1, 0, 0, 0, 618, 119, 1, 0, 0, 0, 619, 620, 5, 105, 0, 0, 620, 621, 3, 122, 61, 0, 621, 622, 5, 106, 0, 0, 622, 121, 1, 0, 0, 0, 623, 624, 6, 61, -1, 0, 624, 625, 3, 124, 62, 0, 625, 631, 1, 0, 0, 0, 626, 627, 10, 1, 0, 0, 627, 628, 5, 57, 0, 0, 628, 630, 3, 124, 62, 0, 629, 626, 1, 0, 0, 0, 630, 633, 1, 0, 0, 0, 631, 629, 1, 0, 0, 0, 631, 632, 1, 0, 0, 0, 632, 123, 1, 0, 0, 0, 633, 631, 1, 0, 0, 0, 634, 635, 3, 8, 4, 0, 635, 125, 1, 0, 0, 0, 636, 640, 5, 12, 0, 0, 637, 638, 3, 52, 26, 0, 638, 639, 5, 63, 0, 0, 639, 641, 1, 0, 0, 0, 640, 637, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 642, 1, 0, 0, 0, 642, 643, 3, 180, 90, 0, 643, 644, 5, 80, 0, 0, 644, 645, 3, 16, 8, 0, 645, 646, 3, 94, 47, 0, 646, 127, 1, 0, 0, 0, 647, 651, 5, 7, 0, 0, 648, 649, 3, 52, 26, 0, 649, 650, 5, 63, 0, 0, 650, 652, 1, 0, 0, 0, 651, 648, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 653, 1, 0, 0, 0, 653, 654, 3, 168, 84, 0, 654, 655, 3, 94, 47, 0, 655, 129, 1, 0, 0, 0, 656, 657, 5, 27, 0, 0, 657, 658, 5, 126, 0, 0, 658, 661, 3, 48, 24, 0, 659, 660, 5, 64, 0, 0, 660, 662, 3, 16, 8, 0, 661, 659, 1, 0, 0, 0, 661, 662, 1, 0, 0, 0, 662, 670, 1, 0, 0, 0, 663, 664, 5, 28, 0, 0, 664, 667, 3, 48, 24, 0, 665, 666, 5, 64, 0, 0, 666, 668, 3, 16, 8, 0, 667, 665, 1, 0, 0, 0, 667, 668, 1, 0, 0, 0, 668, 670, 1, 0, 0, 0, 669, 656, 1, 0, 0, 0, 669, 663, 1, 0, 0, 0, 670, 131, 1, 0, 0, 0, 671, 673, 5, 26, 0, 0, 672, 674, 3, 62, 31, 0, 673, 672, 1, 0, 0, 0, 673, 674, 1, 0, 0, 0, 674, 678, 1, 0, 0, 0, 675, 677, 3, 134, 67, 0, 676, 675, 1, 0, 0, 0, 677, 680, 1, 0, 0, 0, 678, 676, 1, 0, 0, 0, 678, 679, 1, 0, 0, 0, 679, 133, 1, 0, 0, 0, 680, 678, 1, 0, 0, 0, 681, 682, 5, 121, 0, 0, 682, 683, 5, 64, 0, 0, 683, 693, 3, 52, 26, 0, 684, 685, 5, 122, 0, 0, 685, 686, 5, 64, 0, 0, 686, 693, 3, 136, 68, 0, 687, 688, 5, 120, 0, 0, 688, 689, 5, 64, 0, 0, 689, 693, 3, 52, 26, 0, 690, 691, 5, 85, 0, 0, 691, 693, 3, 174, 87, 0, 692, 681, 1, 0, 0, 0, 692, 684, 1, 0, 0, 0, 692, 687, 1, 0, 0, 0, 692, 690, 1, 0, 0, 0, 693, 135, 1, 0, 0, 0, 694, 699, 3, 52, 26, 0, 695, 696, 5, 68, 0, 0, 696, 698, 3, 52, 26, 0, 697, 695, 1, 0, 0, 0, 698, 701, 1, 0, 0, 0, 699, 697, 1, 0, 0, 0, 699, 700, 1, 0, 0, 0, 700, 137, 1, 0, 0, 0, 701, 699, 1, 0, 0, 0, 702, 703, 5, 19, 0, 0, 703, 139, 1, 0, 0, 0, 704, 705, 5, 21, 0, 0, 705, 141, 1, 0, 0, 0, 706, 707, 5, 33, 0, 0, 707, 708, 3, 32, 16, 0, 708, 709, 5, 80, 0, 0, 709, 710, 3, 60, 30, 0, 710, 143, 1, 0, 0, 0, 711, 712, 5, 38, 0, 0, 712, 713, 3, 60, 30, 0, 713, 145, 1, 0, 0, 0, 714, 715, 5, 18, 0, 0, 715, 716, 3, 52, 26, 0, 716, 717, 5, 63, 0, 0, 717, 718, 3, 168, 84, 0, 718, 147, 1, 0, 0, 0, 719, 720, 5, 20, 0, 0, 720, 721, 3, 52, 26, 0, 721, 722, 5, 63, 0, 0, 722, 723, 3, 168, 84, 0, 723, 149, 1, 0, 0, 0, 724, 725, 5, 41, 0, 0, 725, 726, 3, 152, 76, 0, 726, 727, 5, 67, 0, 0, 727, 151, 1, 0, 0, 0, 728, 729, 3, 62, 31, 0, 729, 732, 5, 63, 0, 0, 730, 733, 3, 180, 90, 0, 731, 733, 3, 174, 87, 0, 732, 730, 1, 0, 0, 0, 732, 731, 1, 0, 0, 0, 733, 153, 1, 0, 0, 0, 734, 736, 5, 34, 0, 0, 735, 737, 3, 156, 78, 0, 736, 735, 1, 0, 0, 0, 736, 737, 1, 0, 0, 0, 737, 738, 1, 0, 0, 0, 738, 739, 5, 80, 0, 0, 739, 740, 3, 52, 26, 0, 740, 741, 5, 141, 0, 0, 741, 742, 3, 188, 94, 0, 742, 743, 3, 94, 47, 0, 743, 155, 1, 0, 0, 0, 744, 747, 3, 66, 33, 0, 745, 747, 3, 168, 84, 0, 746, 744, 1, 0, 0, 0, 746, 745, 1, 0, 0, 0, 747, 157, 1, 0, 0, 0, 748, 749, 6, 79, -1, 0, 749, 750, 5, 77, 0, 0, 750, 778, 3, 158, 79, 8, 751, 778, 3, 164, 82, 0, 752, 778, 3, 160, 80, 0, 753, 755, 3, 164, 82, 0, 754, 756, 5, 77, 0, 0, 755, 754, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0, 757, 758, 5, 73, 0, 0, 758, 759, 5, 105, 0, 0, 759, 764, 3, 164, 82, 0, 760, 761, 5, 68, 0, 0, 761, 763, 3, 164, 82, 0, 762, 760, 1, 0, 0, 0, 763, 766, 1, 0, 0, 0, 764, 762, 1, 0, 0, 0, 764, 765, 1, 0, 0, 0, 765, 767, 1, 0, 0, 0, 766, 764, 1, 0, 0, 0, 767, 768, 5, 106, 0, 0, 768, 778, 1, 0, 0, 0, 769, 770, 3, 164, 82, 0, 770, 772, 5, 74, 0, 0, 771, 773, 5, 77, 0, 0, 772, 771, 1, 0, 0, 0, 772, 773, 1, 0, 0, 0, 773, 774, 1, 0, 0, 0, 774, 775, 5, 78, 0, 0, 775, 778, 1, 0, 0, 0, 776, 778, 3, 162, 81, 0, 777, 748, 1, 0, 0, 0, 777, 751, 1, 0, 0, 0, 777, 752, 1, 0, 0, 0, 777, 753, 1, 0, 0, 0, 777, 769, 1, 0, 0, 0, 777, 776, 1, 0, 0, 0, 778, 787, 1, 0, 0, 0, 779, 780, 10, 5, 0, 0, 780, 781, 5, 61, 0, 0, 781, 786, 3, 158, 79, 6, 782, 783, 10, 4, 0, 0, 783, 784, 5, 81, 0, 0, 784, 786, 3, 158, 79, 5, 785, 779, 1, 0, 0, 0, 785, 782, 1, 0, 0, 0, 786, 789, 1, 0, 0, 0, 787, 785, 1, 0, 0, 0, 787, 788, 1, 0, 0, 0, 788, 159, 1, 0, 0, 0, 789, 787, 1, 0, 0, 0, 790, 792, 3, 164, 82, 0, 791, 793, 5, 77, 0, 0, 792, 791, 1, 0, 0, 0, 792, 793, 1, 0, 0, 0, 793, 794, 1, 0, 0, 0, 794, 795, 5, 76, 0, 0, 795, 796, 3, 72, 36, 0, 796, 837, 1, 0, 0, 0, 797, 799, 3, 164, 82, 0, 798, 800, 5, 77, 0, 0, 799, 798, 1, 0, 0, 0, 799, 800, 1, 0, 0, 0, 800, 801, 1, 0, 0, 0, 801, 802, 5, 83, 0, 0, 802, 803, 3, 72, 36, 0, 803, 837, 1, 0, 0, 0, 804, 806, 3, 164, 82, 0, 805, 807, 5, 77, 0, 0, 806, 805, 1, 0, 0, 0, 806, 807, 1, 0, 0, 0, 807, 808, 1, 0, 0, 0, 808, 809, 5, 76, 0, 0, 809, 810, 5, 105, 0, 0, 810, 815, 3, 72, 36, 0, 811, 812, 5, 68, 0, 0, 812, 814, 3, 72, 36, 0, 813, 811, 1, 0, 0, 0, 814, 817, 1, 0, 0, 0, 815, 813, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 818, 1, 0, 0, 0, 817, 815, 1, 0, 0, 0, 818, 819, 5, 106, 0, 0, 819, 837, 1, 0, 0, 0, 820, 822, 3, 164, 82, 0, 821, 823, 5, 77, 0, 0, 822, 821, 1, 0, 0, 0, 822, 823, 1, 0, 0, 0, 823, 824, 1, 0, 0, 0, 824, 825, 5, 83, 0, 0, 825, 826, 5, 105, 0, 0, 826, 831, 3, 72, 36, 0, 827, 828, 5, 68, 0, 0, 828, 830, 3, 72, 36, 0, 829, 827, 1, 0, 0, 0, 830, 833, 1, 0, 0, 0, 831, 829, 1, 0, 0, 0, 831, 832, 1, 0, 0, 0, 832, 834, 1, 0, 0, 0, 833, 831, 1, 0, 0, 0, 834, 835, 5, 106, 0, 0, 835, 837, 1, 0, 0, 0, 836, 790, 1, 0, 0, 0, 836, 797, 1, 0, 0, 0, 836, 804, 1, 0, 0, 0, 836, 820, 1, 0, 0, 0, 837, 161, 1, 0, 0, 0, 838, 841, 3, 52, 26, 0, 839, 840, 5, 65, 0, 0, 840, 842, 3, 12, 6, 0, 841, 839, 1, 0, 0, 0, 841, 842, 1, 0, 0, 0, 842, 843, 1, 0, 0, 0, 843, 844, 5, 66, 0, 0, 844, 845, 3, 180, 90, 0, 845, 163, 1, 0, 0, 0, 846, 852, 3, 166, 83, 0, 847, 848, 3, 166, 83, 0, 848, 849, 3, 192, 96, 0, 849, 850, 3, 166, 83, 0, 850, 852, 1, 0, 0, 0, 851, 846, 1, 0, 0, 0, 851, 847, 1, 0, 0, 0, 852, 165, 1, 0, 0, 0, 853, 854, 6, 83, -1, 0, 854, 858, 3, 168, 84, 0, 855, 856, 7, 5, 0, 0, 856, 858, 3, 166, 83, 3, 857, 853, 1, 0, 0, 0, 857, 855, 1, 0, 0, 0, 858, 867, 1, 0, 0, 0, 859, 860, 10, 2, 0, 0, 860, 861, 7, 6, 0, 0, 861, 866, 3, 166, 83, 3, 862, 863, 10, 1, 0, 0, 863, 864, 7, 5, 0, 0, 864, 866, 3, 166, 83, 2, 865, 859, 1, 0, 0, 0, 865, 862, 1, 0, 0, 0, 866, 869, 1, 0, 0, 0, 867, 865, 1, 0, 0, 0, 867, 868, 1, 0, 0, 0, 868, 167, 1, 0, 0, 0, 869, 867, 1, 0, 0, 0, 870, 871, 6, 84, -1, 0, 871, 879, 3, 180, 90, 0, 872, 879, 3, 52, 26, 0, 873, 879, 3, 170, 85, 0, 874, 875, 5, 105, 0, 0, 875, 876, 3, 158, 79, 0, 876, 877, 5, 106, 0, 0, 877, 879, 1, 0, 0, 0, 878, 870, 1, 0, 0, 0, 878, 872, 1, 0, 0, 0, 878, 873, 1, 0, 0, 0, 878, 874, 1, 0, 0, 0, 879, 885, 1, 0, 0, 0, 880, 881, 10, 1, 0, 0, 881, 882, 5, 65, 0, 0, 882, 884, 3, 12, 6, 0, 883, 880, 1, 0, 0, 0, 884, 887, 1, 0, 0, 0, 885, 883, 1, 0, 0, 0, 885, 886, 1, 0, 0, 0, 886, 169, 1, 0, 0, 0, 887, 885, 1, 0, 0, 0, 888, 889, 3, 172, 86, 0, 889, 903, 5, 105, 0, 0, 890, 904, 5, 95, 0, 0, 891, 896, 3, 158, 79, 0, 892, 893, 5, 68, 0, 0, 893, 895, 3, 158, 79, 0, 894, 892, 1, 0, 0, 0, 895, 898, 1, 0, 0, 0, 896, 894, 1, 0, 0, 0, 896, 897, 1, 0, 0, 0, 897, 901, 1, 0, 0, 0, 898, 896, 1, 0, 0, 0, 899, 900, 5, 68, 0, 0, 900, 902, 3, 174, 87, 0, 901, 899, 1, 0, 0, 0, 901, 902, 1, 0, 0, 0, 902, 904, 1, 0, 0, 0, 903, 890, 1, 0, 0, 0, 903, 891, 1, 0, 0, 0, 903, 904, 1, 0, 0, 0, 904, 905, 1, 0, 0, 0, 905, 906, 5, 106, 0, 0, 906, 171, 1, 0, 0, 0, 907, 911, 3, 70, 35, 0, 908, 911, 5, 72, 0, 0, 909, 911, 5, 75, 0, 0, 910, 907, 1, 0, 0, 0, 910, 908, 1, 0, 0, 0, 910, 909, 1, 0, 0, 0, 911, 173, 1, 0, 0, 0, 912, 921, 5, 98, 0, 0, 913, 918, 3, 176, 88, 0, 914, 915, 5, 68, 0, 0, 915, 917, 3, 176, 88, 0, 916, 914, 1, 0, 0, 0, 917, 920, 1, 0, 0, 0, 918, 916, 1, 0, 0, 0, 918, 919, 1, 0, 0, 0, 919, 922, 1, 0, 0, 0, 920, 918, 1, 0, 0, 0, 921, 913, 1, 0, 0, 0, 921, 922, 1, 0, 0, 0, 922, 923, 1, 0, 0, 0, 923, 924, 5, 99, 0, 0, 924, 175, 1, 0, 0, 0, 925, 926, 3, 190, 95, 0, 926, 927, 5, 66, 0, 0, 927, 928, 3, 178, 89, 0, 928, 177, 1, 0, 0, 0, 929, 932, 3, 180, 90, 0, 930, 932, 3, 174, 87, 0, 931, 929, 1, 0, 0, 0, 931, 930, 1, 0, 0, 0, 932, 179, 1, 0, 0, 0, 933, 976, 5, 78, 0, 0, 934, 935, 3, 188, 94, 0, 935, 936, 5, 107, 0, 0, 936, 976, 1, 0, 0, 0, 937, 976, 3, 186, 93, 0, 938, 976, 3, 188, 94, 0, 939, 976, 3, 182, 91, 0, 940, 976, 3, 66, 33, 0, 941, 976, 3, 190, 95, 0, 942, 943, 5, 103, 0, 0, 943, 948, 3, 184, 92, 0, 944, 945, 5, 68, 0, 0, 945, 947, 3, 184, 92, 0, 946, 944, 1, 0, 0, 0, 947, 950, 1, 0, 0, 0, 948, 946, 1, 0, 0, 0, 948, 949, 1, 0, 0, 0, 949, 951, 1, 0, 0, 0, 950, 948, 1, 0, 0, 0, 951, 952, 5, 104, 0, 0, 952, 976, 1, 0, 0, 0, 953, 954, 5, 103, 0, 0, 954, 959, 3, 182, 91, 0, 955, 956, 5, 68, 0, 0, 956, 958, 3, 182, 91, 0, 957, 955, 1, 0, 0, 0, 958, 961, 1, 0, 0, 0, 959, 957, 1, 0, 0, 0, 959, 960, 1, 0, 0, 0, 960, 962, 1, 0, 0, 0, 961, 959, 1, 0, 0, 0, 962, 963, 5, 104, 0, 0, 963, 976, 1, 0, 0, 0, 964, 965, 5, 103, 0, 0, 965, 970, 3, 190, 95, 0, 966, 967, 5, 68, 0, 0, 967, 969, 3, 190, 95, 0, 968, 966, 1, 0, 0, 0, 969, 972, 1, 0, 0, 0, 970, 968, 1, 0, 0, 0, 970, 971, 1, 0, 0, 0, 971, 973, 1, 0, 0, 0, 972, 970, 1, 0, 0, 0, 973, 974, 5, 104, 0, 0, 974, 976, 1, 0, 0, 0, 975, 933, 1, 0, 0, 0, 975, 934, 1, 0, 0, 0, 975, 937, 1, 0, 0, 0, 975, 938, 1, 0, 0, 0, 975, 939, 1, 0, 0, 0, 975, 940, 1, 0, 0, 0, 975, 941, 1, 0, 0, 0, 975, 942, 1, 0, 0, 0, 975, 953, 1, 0, 0, 0, 975, 964, 1, 0, 0, 0, 976, 181, 1, 0, 0, 0, 977, 978, 7, 7, 0, 0, 978, 183, 1, 0, 0, 0, 979, 982, 3, 186, 93, 0, 980, 982, 3, 188, 94, 0, 981, 979, 1, 0, 0, 0, 981, 980, 1, 0, 0, 0, 982, 185, 1, 0, 0, 0, 983, 985, 7, 5, 0, 0, 984, 983, 1, 0, 0, 0, 984, 985, 1, 0, 0, 0, 985, 986, 1, 0, 0, 0, 986, 987, 5, 60, 0, 0, 987, 187, 1, 0, 0, 0, 988, 990, 7, 5, 0, 0, 989, 988, 1, 0, 0, 0, 989, 990, 1, 0, 0, 0, 990, 991, 1, 0, 0, 0, 991, 992, 5, 59, 0, 0, 992, 189, 1, 0, 0, 0, 993, 994, 5, 58, 0, 0, 994, 191, 1, 0, 0, 0, 995, 996, 7, 8, 0, 0, 996, 193, 1, 0, 0, 0, 997, 998, 7, 9, 0, 0, 998, 999, 5, 130, 0, 0, 999, 1000, 3, 196, 98, 0, 1000, 1001, 3, 198, 99, 0, 1001, 195, 1, 0, 0, 0, 1002, 1003, 4, 98, 14, 0, 1003, 1005, 3, 32, 16, 0, 1004, 1006, 5, 158, 0, 0, 1005, 1004, 1, 0, 0, 0, 1005, 1006, 1, 0, 0, 0, 1006, 1007, 1, 0, 0, 0, 1007, 1008, 5, 113, 0, 0, 1008, 1011, 1, 0, 0, 0, 1009, 1011, 3, 32, 16, 0, 1010, 1002, 1, 0, 0, 0, 1010, 1009, 1, 0, 0, 0, 1011, 197, 1, 0, 0, 0, 1012, 1013, 5, 80, 0, 0, 1013, 1018, 3, 158, 79, 0, 1014, 1015, 5, 68, 0, 0, 1015, 1017, 3, 158, 79, 0, 1016, 1014, 1, 0, 0, 0, 1017, 1020, 1, 0, 0, 0, 1018, 1016, 1, 0, 0, 0, 1018, 1019, 1, 0, 0, 0, 1019, 199, 1, 0, 0, 0, 1020, 1018, 1, 0, 0, 0, 1021, 1025, 5, 39, 0, 0, 1022, 1024, 3, 204, 102, 0, 1023, 1022, 1, 0, 0, 0, 1024, 1027, 1, 0, 0, 0, 1025, 1023, 1, 0, 0, 0, 1025, 1026, 1, 0, 0, 0, 1026, 1031, 1, 0, 0, 0, 1027, 1025, 1, 0, 0, 0, 1028, 1029, 3, 202, 101, 0, 1029, 1030, 5, 63, 0, 0, 1030, 1032, 1, 0, 0, 0, 1031, 1028, 1, 0, 0, 0, 1031, 1032, 1, 0, 0, 0, 1032, 1033, 1, 0, 0, 0, 1033, 1035, 5, 105, 0, 0, 1034, 1036, 3, 212, 106, 0, 1035, 1034, 1, 0, 0, 0, 1036, 1037, 1, 0, 0, 0, 1037, 1035, 1, 0, 0, 0, 1037, 1038, 1, 0, 0, 0, 1038, 1039, 1, 0, 0, 0, 1039, 1040, 5, 106, 0, 0, 1040, 1054, 1, 0, 0, 0, 1041, 1045, 5, 39, 0, 0, 1042, 1044, 3, 204, 102, 0, 1043, 1042, 1, 0, 0, 0, 1044, 1047, 1, 0, 0, 0, 1045, 1043, 1, 0, 0, 0, 1045, 1046, 1, 0, 0, 0, 1046, 1049, 1, 0, 0, 0, 1047, 1045, 1, 0, 0, 0, 1048, 1050, 3, 212, 106, 0, 1049, 1048, 1, 0, 0, 0, 1050, 1051, 1, 0, 0, 0, 1051, 1049, 1, 0, 0, 0, 1051, 1052, 1, 0, 0, 0, 1052, 1054, 1, 0, 0, 0, 1053, 1021, 1, 0, 0, 0, 1053, 1041, 1, 0, 0, 0, 1054, 201, 1, 0, 0, 0, 1055, 1056, 7, 1, 0, 0, 1056, 203, 1, 0, 0, 0, 1057, 1058, 3, 206, 103, 0, 1058, 1059, 5, 63, 0, 0, 1059, 1060, 3, 208, 104, 0, 1060, 205, 1, 0, 0, 0, 1061, 1062, 7, 10, 0, 0, 1062, 207, 1, 0, 0, 0, 1063, 1068, 3, 214, 107, 0, 1064, 1065, 5, 68, 0, 0, 1065, 1067, 3, 214, 107, 0, 1066, 1064, 1, 0, 0, 0, 1067, 1070, 1, 0, 0, 0, 1068, 1066, 1, 0, 0, 0, 1068, 1069, 1, 0, 0, 0, 1069, 1074, 1, 0, 0, 0, 1070, 1068, 1, 0, 0, 0, 1071, 1074, 5, 108, 0, 0, 1072, 1074, 5, 101, 0, 0, 1073, 1063, 1, 0, 0, 0, 1073, 1071, 1, 0, 0, 0, 1073, 1072, 1, 0, 0, 0, 1074, 209, 1, 0, 0, 0, 1075, 1076, 7, 11, 0, 0, 1076, 211, 1, 0, 0, 0, 1077, 1079, 3, 210, 105, 0, 1078, 1077, 1, 0, 0, 0, 1079, 1080, 1, 0, 0, 0, 1080, 1078, 1, 0, 0, 0, 1080, 1081, 1, 0, 0, 0, 1081, 1091, 1, 0, 0, 0, 1082, 1086, 5, 105, 0, 0, 1083, 1085, 3, 212, 106, 0, 1084, 1083, 1, 0, 0, 0, 1085, 1088, 1, 0, 0, 0, 1086, 1084, 1, 0, 0, 0, 1086, 1087, 1, 0, 0, 0, 1087, 1089, 1, 0, 0, 0, 1088, 1086, 1, 0, 0, 0, 1089, 1091, 5, 106, 0, 0, 1090, 1078, 1, 0, 0, 0, 1090, 1082, 1, 0, 0, 0, 1091, 213, 1, 0, 0, 0, 1092, 1093, 3, 216, 108, 0, 1093, 1094, 5, 66, 0, 0, 1094, 1095, 3, 220, 110, 0, 1095, 1102, 1, 0, 0, 0, 1096, 1097, 3, 220, 110, 0, 1097, 1098, 5, 65, 0, 0, 1098, 1099, 3, 218, 109, 0, 1099, 1102, 1, 0, 0, 0, 1100, 1102, 3, 222, 111, 0, 1101, 1092, 1, 0, 0, 0, 1101, 1096, 1, 0, 0, 0, 1101, 1100, 1, 0, 0, 0, 1102, 215, 1, 0, 0, 0, 1103, 1104, 7, 12, 0, 0, 1104, 217, 1, 0, 0, 0, 1105, 1106, 7, 12, 0, 0, 1106, 219, 1, 0, 0, 0, 1107, 1108, 7, 12, 0, 0, 1108, 221, 1, 0, 0, 0, 1109, 1110, 7, 13, 0, 0, 1110, 223, 1, 0, 0, 0, 108, 227, 244, 256, 287, 302, 308, 327, 331, 336, 344, 352, 357, 360, 376, 384, 388, 395, 401, 406, 415, 422, 428, 437, 444, 452, 460, 464, 468, 473, 477, 488, 493, 497, 511, 522, 528, 535, 544, 553, 573, 581, 584, 591, 602, 609, 617, 631, 640, 651, 661, 667, 669, 673, 678, 692, 699, 732, 736, 746, 755, 764, 772, 777, 785, 787, 792, 799, 806, 815, 822, 831, 836, 841, 851, 857, 865, 867, 878, 885, 896, 901, 903, 910, 918, 921, 931, 948, 959, 970, 975, 981, 984, 989, 1005, 1010, 1018, 1025, 1031, 1037, 1045, 1051, 1053, 1068, 1073, 1080, 1086, 1090, 1101] \ No newline at end of file +[4, 1, 168, 1120, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 1, 0, 5, 0, 228, 8, 0, 10, 0, 12, 0, 231, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 245, 8, 2, 10, 2, 12, 2, 248, 9, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 259, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 290, 8, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 303, 8, 8, 10, 8, 12, 8, 306, 9, 8, 1, 9, 1, 9, 1, 9, 3, 9, 311, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 5, 13, 328, 8, 13, 10, 13, 12, 13, 331, 9, 13, 1, 13, 3, 13, 334, 8, 13, 1, 14, 1, 14, 1, 14, 3, 14, 339, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 345, 8, 15, 10, 15, 12, 15, 348, 9, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 3, 16, 355, 8, 16, 1, 16, 1, 16, 1, 16, 3, 16, 360, 8, 16, 1, 16, 3, 16, 363, 8, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 377, 8, 21, 10, 21, 12, 21, 380, 9, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 387, 8, 23, 1, 23, 1, 23, 3, 23, 391, 8, 23, 1, 24, 1, 24, 1, 24, 5, 24, 396, 8, 24, 10, 24, 12, 24, 399, 9, 24, 1, 25, 1, 25, 1, 25, 3, 25, 404, 8, 25, 1, 26, 1, 26, 1, 26, 3, 26, 409, 8, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 418, 8, 26, 1, 27, 1, 27, 1, 27, 5, 27, 423, 8, 27, 10, 27, 12, 27, 426, 9, 27, 1, 28, 1, 28, 1, 28, 3, 28, 431, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 440, 8, 28, 1, 29, 1, 29, 1, 29, 5, 29, 445, 8, 29, 10, 29, 12, 29, 448, 9, 29, 1, 30, 1, 30, 1, 30, 5, 30, 453, 8, 30, 10, 30, 12, 30, 456, 9, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 3, 32, 463, 8, 32, 1, 33, 1, 33, 3, 33, 467, 8, 33, 1, 34, 1, 34, 3, 34, 471, 8, 34, 1, 35, 1, 35, 1, 35, 3, 35, 476, 8, 35, 1, 36, 1, 36, 3, 36, 480, 8, 36, 1, 37, 1, 37, 1, 37, 3, 37, 485, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 495, 8, 39, 10, 39, 12, 39, 498, 9, 39, 1, 40, 1, 40, 3, 40, 502, 8, 40, 1, 40, 1, 40, 3, 40, 506, 8, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 518, 8, 43, 10, 43, 12, 43, 521, 9, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 531, 8, 44, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 537, 8, 45, 1, 46, 1, 46, 1, 46, 5, 46, 542, 8, 46, 10, 46, 12, 46, 545, 9, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 3, 48, 553, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 5, 49, 560, 8, 49, 10, 49, 12, 49, 563, 9, 49, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 3, 54, 582, 8, 54, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 588, 8, 54, 10, 54, 12, 54, 591, 9, 54, 3, 54, 593, 8, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 3, 56, 600, 8, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 611, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 618, 8, 58, 1, 59, 1, 59, 1, 59, 1, 60, 4, 60, 624, 8, 60, 11, 60, 12, 60, 625, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 5, 62, 638, 8, 62, 10, 62, 12, 62, 641, 9, 62, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 3, 64, 649, 8, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 660, 8, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 670, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 676, 8, 66, 3, 66, 678, 8, 66, 1, 67, 1, 67, 3, 67, 682, 8, 67, 1, 67, 5, 67, 685, 8, 67, 10, 67, 12, 67, 688, 9, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 701, 8, 68, 1, 69, 1, 69, 1, 69, 5, 69, 706, 8, 69, 10, 69, 12, 69, 709, 9, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 3, 77, 741, 8, 77, 1, 78, 1, 78, 3, 78, 745, 8, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 3, 79, 755, 8, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 3, 80, 764, 8, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 5, 80, 771, 8, 80, 10, 80, 12, 80, 774, 9, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 3, 80, 781, 8, 80, 1, 80, 1, 80, 1, 80, 3, 80, 786, 8, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 5, 80, 794, 8, 80, 10, 80, 12, 80, 797, 9, 80, 1, 81, 1, 81, 3, 81, 801, 8, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 3, 81, 808, 8, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 3, 81, 815, 8, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 5, 81, 822, 8, 81, 10, 81, 12, 81, 825, 9, 81, 1, 81, 1, 81, 1, 81, 1, 81, 3, 81, 831, 8, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 5, 81, 838, 8, 81, 10, 81, 12, 81, 841, 9, 81, 1, 81, 1, 81, 3, 81, 845, 8, 81, 1, 82, 1, 82, 1, 82, 3, 82, 850, 8, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 3, 83, 860, 8, 83, 1, 84, 1, 84, 1, 84, 1, 84, 3, 84, 866, 8, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 5, 84, 874, 8, 84, 10, 84, 12, 84, 877, 9, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 3, 85, 887, 8, 85, 1, 85, 1, 85, 1, 85, 5, 85, 892, 8, 85, 10, 85, 12, 85, 895, 9, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 5, 86, 903, 8, 86, 10, 86, 12, 86, 906, 9, 86, 1, 86, 1, 86, 3, 86, 910, 8, 86, 3, 86, 912, 8, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 3, 87, 919, 8, 87, 1, 88, 1, 88, 1, 88, 1, 88, 5, 88, 925, 8, 88, 10, 88, 12, 88, 928, 9, 88, 3, 88, 930, 8, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 3, 90, 940, 8, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 5, 91, 955, 8, 91, 10, 91, 12, 91, 958, 9, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 5, 91, 966, 8, 91, 10, 91, 12, 91, 969, 9, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 5, 91, 977, 8, 91, 10, 91, 12, 91, 980, 9, 91, 1, 91, 1, 91, 3, 91, 984, 8, 91, 1, 92, 1, 92, 1, 93, 1, 93, 3, 93, 990, 8, 93, 1, 94, 3, 94, 993, 8, 94, 1, 94, 1, 94, 1, 95, 3, 95, 998, 8, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 3, 99, 1014, 8, 99, 1, 99, 1, 99, 1, 99, 3, 99, 1019, 8, 99, 1, 100, 1, 100, 1, 100, 1, 100, 5, 100, 1025, 8, 100, 10, 100, 12, 100, 1028, 9, 100, 1, 101, 1, 101, 5, 101, 1032, 8, 101, 10, 101, 12, 101, 1035, 9, 101, 1, 101, 1, 101, 1, 101, 3, 101, 1040, 8, 101, 1, 101, 1, 101, 4, 101, 1044, 8, 101, 11, 101, 12, 101, 1045, 1, 101, 1, 101, 1, 101, 1, 101, 5, 101, 1052, 8, 101, 10, 101, 12, 101, 1055, 9, 101, 1, 101, 4, 101, 1058, 8, 101, 11, 101, 12, 101, 1059, 3, 101, 1062, 8, 101, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, 5, 105, 1075, 8, 105, 10, 105, 12, 105, 1078, 9, 105, 1, 105, 1, 105, 3, 105, 1082, 8, 105, 1, 106, 1, 106, 1, 107, 4, 107, 1087, 8, 107, 11, 107, 12, 107, 1088, 1, 107, 1, 107, 5, 107, 1093, 8, 107, 10, 107, 12, 107, 1096, 9, 107, 1, 107, 3, 107, 1099, 8, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 3, 108, 1110, 8, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 0, 5, 4, 124, 160, 168, 170, 113, 0, 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, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 0, 14, 2, 0, 58, 58, 113, 113, 1, 0, 107, 108, 2, 0, 62, 62, 69, 69, 2, 0, 72, 72, 75, 75, 2, 0, 47, 47, 58, 58, 1, 0, 93, 94, 1, 0, 95, 97, 2, 0, 71, 71, 84, 84, 2, 0, 86, 86, 88, 92, 2, 0, 29, 29, 31, 32, 3, 0, 58, 58, 101, 101, 107, 108, 8, 0, 58, 58, 63, 63, 65, 66, 68, 68, 101, 101, 107, 108, 113, 113, 155, 157, 2, 0, 107, 107, 113, 113, 3, 0, 58, 58, 107, 107, 113, 113, 1169, 0, 229, 1, 0, 0, 0, 2, 235, 1, 0, 0, 0, 4, 238, 1, 0, 0, 0, 6, 258, 1, 0, 0, 0, 8, 289, 1, 0, 0, 0, 10, 291, 1, 0, 0, 0, 12, 294, 1, 0, 0, 0, 14, 296, 1, 0, 0, 0, 16, 299, 1, 0, 0, 0, 18, 310, 1, 0, 0, 0, 20, 314, 1, 0, 0, 0, 22, 317, 1, 0, 0, 0, 24, 320, 1, 0, 0, 0, 26, 324, 1, 0, 0, 0, 28, 338, 1, 0, 0, 0, 30, 340, 1, 0, 0, 0, 32, 362, 1, 0, 0, 0, 34, 364, 1, 0, 0, 0, 36, 366, 1, 0, 0, 0, 38, 368, 1, 0, 0, 0, 40, 370, 1, 0, 0, 0, 42, 372, 1, 0, 0, 0, 44, 381, 1, 0, 0, 0, 46, 384, 1, 0, 0, 0, 48, 392, 1, 0, 0, 0, 50, 400, 1, 0, 0, 0, 52, 417, 1, 0, 0, 0, 54, 419, 1, 0, 0, 0, 56, 439, 1, 0, 0, 0, 58, 441, 1, 0, 0, 0, 60, 449, 1, 0, 0, 0, 62, 457, 1, 0, 0, 0, 64, 462, 1, 0, 0, 0, 66, 466, 1, 0, 0, 0, 68, 470, 1, 0, 0, 0, 70, 475, 1, 0, 0, 0, 72, 479, 1, 0, 0, 0, 74, 481, 1, 0, 0, 0, 76, 486, 1, 0, 0, 0, 78, 490, 1, 0, 0, 0, 80, 499, 1, 0, 0, 0, 82, 507, 1, 0, 0, 0, 84, 510, 1, 0, 0, 0, 86, 513, 1, 0, 0, 0, 88, 530, 1, 0, 0, 0, 90, 532, 1, 0, 0, 0, 92, 538, 1, 0, 0, 0, 94, 546, 1, 0, 0, 0, 96, 552, 1, 0, 0, 0, 98, 554, 1, 0, 0, 0, 100, 564, 1, 0, 0, 0, 102, 567, 1, 0, 0, 0, 104, 570, 1, 0, 0, 0, 106, 574, 1, 0, 0, 0, 108, 577, 1, 0, 0, 0, 110, 594, 1, 0, 0, 0, 112, 599, 1, 0, 0, 0, 114, 603, 1, 0, 0, 0, 116, 606, 1, 0, 0, 0, 118, 619, 1, 0, 0, 0, 120, 623, 1, 0, 0, 0, 122, 627, 1, 0, 0, 0, 124, 631, 1, 0, 0, 0, 126, 642, 1, 0, 0, 0, 128, 644, 1, 0, 0, 0, 130, 655, 1, 0, 0, 0, 132, 677, 1, 0, 0, 0, 134, 679, 1, 0, 0, 0, 136, 700, 1, 0, 0, 0, 138, 702, 1, 0, 0, 0, 140, 710, 1, 0, 0, 0, 142, 712, 1, 0, 0, 0, 144, 714, 1, 0, 0, 0, 146, 719, 1, 0, 0, 0, 148, 722, 1, 0, 0, 0, 150, 727, 1, 0, 0, 0, 152, 732, 1, 0, 0, 0, 154, 736, 1, 0, 0, 0, 156, 742, 1, 0, 0, 0, 158, 754, 1, 0, 0, 0, 160, 785, 1, 0, 0, 0, 162, 844, 1, 0, 0, 0, 164, 846, 1, 0, 0, 0, 166, 859, 1, 0, 0, 0, 168, 865, 1, 0, 0, 0, 170, 886, 1, 0, 0, 0, 172, 896, 1, 0, 0, 0, 174, 918, 1, 0, 0, 0, 176, 920, 1, 0, 0, 0, 178, 933, 1, 0, 0, 0, 180, 939, 1, 0, 0, 0, 182, 983, 1, 0, 0, 0, 184, 985, 1, 0, 0, 0, 186, 989, 1, 0, 0, 0, 188, 992, 1, 0, 0, 0, 190, 997, 1, 0, 0, 0, 192, 1001, 1, 0, 0, 0, 194, 1003, 1, 0, 0, 0, 196, 1005, 1, 0, 0, 0, 198, 1018, 1, 0, 0, 0, 200, 1020, 1, 0, 0, 0, 202, 1061, 1, 0, 0, 0, 204, 1063, 1, 0, 0, 0, 206, 1065, 1, 0, 0, 0, 208, 1069, 1, 0, 0, 0, 210, 1081, 1, 0, 0, 0, 212, 1083, 1, 0, 0, 0, 214, 1098, 1, 0, 0, 0, 216, 1109, 1, 0, 0, 0, 218, 1111, 1, 0, 0, 0, 220, 1113, 1, 0, 0, 0, 222, 1115, 1, 0, 0, 0, 224, 1117, 1, 0, 0, 0, 226, 228, 3, 152, 76, 0, 227, 226, 1, 0, 0, 0, 228, 231, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 232, 1, 0, 0, 0, 231, 229, 1, 0, 0, 0, 232, 233, 3, 2, 1, 0, 233, 234, 5, 0, 0, 1, 234, 1, 1, 0, 0, 0, 235, 236, 3, 4, 2, 0, 236, 237, 5, 0, 0, 1, 237, 3, 1, 0, 0, 0, 238, 239, 6, 2, -1, 0, 239, 240, 3, 6, 3, 0, 240, 246, 1, 0, 0, 0, 241, 242, 10, 1, 0, 0, 242, 243, 5, 57, 0, 0, 243, 245, 3, 8, 4, 0, 244, 241, 1, 0, 0, 0, 245, 248, 1, 0, 0, 0, 246, 244, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 5, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 249, 259, 3, 20, 10, 0, 250, 259, 3, 14, 7, 0, 251, 259, 3, 106, 53, 0, 252, 259, 3, 22, 11, 0, 253, 259, 3, 202, 101, 0, 254, 255, 4, 3, 1, 0, 255, 259, 3, 102, 51, 0, 256, 257, 4, 3, 2, 0, 257, 259, 3, 24, 12, 0, 258, 249, 1, 0, 0, 0, 258, 250, 1, 0, 0, 0, 258, 251, 1, 0, 0, 0, 258, 252, 1, 0, 0, 0, 258, 253, 1, 0, 0, 0, 258, 254, 1, 0, 0, 0, 258, 256, 1, 0, 0, 0, 259, 7, 1, 0, 0, 0, 260, 290, 3, 44, 22, 0, 261, 290, 3, 10, 5, 0, 262, 290, 3, 82, 41, 0, 263, 290, 3, 74, 37, 0, 264, 290, 3, 46, 23, 0, 265, 290, 3, 78, 39, 0, 266, 290, 3, 84, 42, 0, 267, 290, 3, 86, 43, 0, 268, 290, 3, 90, 45, 0, 269, 290, 3, 98, 49, 0, 270, 290, 3, 108, 54, 0, 271, 290, 3, 100, 50, 0, 272, 290, 3, 196, 98, 0, 273, 290, 3, 116, 58, 0, 274, 290, 3, 130, 65, 0, 275, 290, 3, 114, 57, 0, 276, 290, 3, 118, 59, 0, 277, 290, 3, 128, 64, 0, 278, 290, 3, 132, 66, 0, 279, 290, 3, 134, 67, 0, 280, 290, 3, 148, 74, 0, 281, 290, 3, 140, 70, 0, 282, 290, 3, 150, 75, 0, 283, 290, 3, 142, 71, 0, 284, 290, 3, 156, 78, 0, 285, 286, 4, 4, 3, 0, 286, 290, 3, 144, 72, 0, 287, 288, 4, 4, 4, 0, 288, 290, 3, 146, 73, 0, 289, 260, 1, 0, 0, 0, 289, 261, 1, 0, 0, 0, 289, 262, 1, 0, 0, 0, 289, 263, 1, 0, 0, 0, 289, 264, 1, 0, 0, 0, 289, 265, 1, 0, 0, 0, 289, 266, 1, 0, 0, 0, 289, 267, 1, 0, 0, 0, 289, 268, 1, 0, 0, 0, 289, 269, 1, 0, 0, 0, 289, 270, 1, 0, 0, 0, 289, 271, 1, 0, 0, 0, 289, 272, 1, 0, 0, 0, 289, 273, 1, 0, 0, 0, 289, 274, 1, 0, 0, 0, 289, 275, 1, 0, 0, 0, 289, 276, 1, 0, 0, 0, 289, 277, 1, 0, 0, 0, 289, 278, 1, 0, 0, 0, 289, 279, 1, 0, 0, 0, 289, 280, 1, 0, 0, 0, 289, 281, 1, 0, 0, 0, 289, 282, 1, 0, 0, 0, 289, 283, 1, 0, 0, 0, 289, 284, 1, 0, 0, 0, 289, 285, 1, 0, 0, 0, 289, 287, 1, 0, 0, 0, 290, 9, 1, 0, 0, 0, 291, 292, 5, 17, 0, 0, 292, 293, 3, 160, 80, 0, 293, 11, 1, 0, 0, 0, 294, 295, 3, 62, 31, 0, 295, 13, 1, 0, 0, 0, 296, 297, 5, 13, 0, 0, 297, 298, 3, 16, 8, 0, 298, 15, 1, 0, 0, 0, 299, 304, 3, 18, 9, 0, 300, 301, 5, 68, 0, 0, 301, 303, 3, 18, 9, 0, 302, 300, 1, 0, 0, 0, 303, 306, 1, 0, 0, 0, 304, 302, 1, 0, 0, 0, 304, 305, 1, 0, 0, 0, 305, 17, 1, 0, 0, 0, 306, 304, 1, 0, 0, 0, 307, 308, 3, 52, 26, 0, 308, 309, 5, 63, 0, 0, 309, 311, 1, 0, 0, 0, 310, 307, 1, 0, 0, 0, 310, 311, 1, 0, 0, 0, 311, 312, 1, 0, 0, 0, 312, 313, 3, 160, 80, 0, 313, 19, 1, 0, 0, 0, 314, 315, 5, 22, 0, 0, 315, 316, 3, 26, 13, 0, 316, 21, 1, 0, 0, 0, 317, 318, 5, 23, 0, 0, 318, 319, 3, 26, 13, 0, 319, 23, 1, 0, 0, 0, 320, 321, 5, 24, 0, 0, 321, 322, 3, 72, 36, 0, 322, 323, 3, 96, 48, 0, 323, 25, 1, 0, 0, 0, 324, 329, 3, 28, 14, 0, 325, 326, 5, 68, 0, 0, 326, 328, 3, 28, 14, 0, 327, 325, 1, 0, 0, 0, 328, 331, 1, 0, 0, 0, 329, 327, 1, 0, 0, 0, 329, 330, 1, 0, 0, 0, 330, 333, 1, 0, 0, 0, 331, 329, 1, 0, 0, 0, 332, 334, 3, 42, 21, 0, 333, 332, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 27, 1, 0, 0, 0, 335, 339, 3, 32, 16, 0, 336, 337, 4, 14, 5, 0, 337, 339, 3, 30, 15, 0, 338, 335, 1, 0, 0, 0, 338, 336, 1, 0, 0, 0, 339, 29, 1, 0, 0, 0, 340, 341, 5, 105, 0, 0, 341, 346, 3, 20, 10, 0, 342, 343, 5, 57, 0, 0, 343, 345, 3, 8, 4, 0, 344, 342, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 349, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 350, 5, 106, 0, 0, 350, 31, 1, 0, 0, 0, 351, 352, 3, 34, 17, 0, 352, 353, 5, 66, 0, 0, 353, 355, 1, 0, 0, 0, 354, 351, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 356, 1, 0, 0, 0, 356, 359, 3, 38, 19, 0, 357, 358, 5, 65, 0, 0, 358, 360, 3, 36, 18, 0, 359, 357, 1, 0, 0, 0, 359, 360, 1, 0, 0, 0, 360, 363, 1, 0, 0, 0, 361, 363, 3, 40, 20, 0, 362, 354, 1, 0, 0, 0, 362, 361, 1, 0, 0, 0, 363, 33, 1, 0, 0, 0, 364, 365, 5, 113, 0, 0, 365, 35, 1, 0, 0, 0, 366, 367, 5, 113, 0, 0, 367, 37, 1, 0, 0, 0, 368, 369, 5, 113, 0, 0, 369, 39, 1, 0, 0, 0, 370, 371, 7, 0, 0, 0, 371, 41, 1, 0, 0, 0, 372, 373, 5, 112, 0, 0, 373, 378, 5, 113, 0, 0, 374, 375, 5, 68, 0, 0, 375, 377, 5, 113, 0, 0, 376, 374, 1, 0, 0, 0, 377, 380, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 43, 1, 0, 0, 0, 380, 378, 1, 0, 0, 0, 381, 382, 5, 9, 0, 0, 382, 383, 3, 16, 8, 0, 383, 45, 1, 0, 0, 0, 384, 386, 5, 16, 0, 0, 385, 387, 3, 48, 24, 0, 386, 385, 1, 0, 0, 0, 386, 387, 1, 0, 0, 0, 387, 390, 1, 0, 0, 0, 388, 389, 5, 64, 0, 0, 389, 391, 3, 16, 8, 0, 390, 388, 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 47, 1, 0, 0, 0, 392, 397, 3, 50, 25, 0, 393, 394, 5, 68, 0, 0, 394, 396, 3, 50, 25, 0, 395, 393, 1, 0, 0, 0, 396, 399, 1, 0, 0, 0, 397, 395, 1, 0, 0, 0, 397, 398, 1, 0, 0, 0, 398, 49, 1, 0, 0, 0, 399, 397, 1, 0, 0, 0, 400, 403, 3, 18, 9, 0, 401, 402, 5, 17, 0, 0, 402, 404, 3, 160, 80, 0, 403, 401, 1, 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 51, 1, 0, 0, 0, 405, 406, 4, 26, 6, 0, 406, 408, 5, 103, 0, 0, 407, 409, 5, 107, 0, 0, 408, 407, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, 410, 411, 5, 104, 0, 0, 411, 412, 5, 70, 0, 0, 412, 413, 5, 103, 0, 0, 413, 414, 3, 54, 27, 0, 414, 415, 5, 104, 0, 0, 415, 418, 1, 0, 0, 0, 416, 418, 3, 54, 27, 0, 417, 405, 1, 0, 0, 0, 417, 416, 1, 0, 0, 0, 418, 53, 1, 0, 0, 0, 419, 424, 3, 70, 35, 0, 420, 421, 5, 70, 0, 0, 421, 423, 3, 70, 35, 0, 422, 420, 1, 0, 0, 0, 423, 426, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 55, 1, 0, 0, 0, 426, 424, 1, 0, 0, 0, 427, 428, 4, 28, 7, 0, 428, 430, 5, 103, 0, 0, 429, 431, 5, 148, 0, 0, 430, 429, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 432, 1, 0, 0, 0, 432, 433, 5, 104, 0, 0, 433, 434, 5, 70, 0, 0, 434, 435, 5, 103, 0, 0, 435, 436, 3, 58, 29, 0, 436, 437, 5, 104, 0, 0, 437, 440, 1, 0, 0, 0, 438, 440, 3, 58, 29, 0, 439, 427, 1, 0, 0, 0, 439, 438, 1, 0, 0, 0, 440, 57, 1, 0, 0, 0, 441, 446, 3, 64, 32, 0, 442, 443, 5, 70, 0, 0, 443, 445, 3, 64, 32, 0, 444, 442, 1, 0, 0, 0, 445, 448, 1, 0, 0, 0, 446, 444, 1, 0, 0, 0, 446, 447, 1, 0, 0, 0, 447, 59, 1, 0, 0, 0, 448, 446, 1, 0, 0, 0, 449, 454, 3, 56, 28, 0, 450, 451, 5, 68, 0, 0, 451, 453, 3, 56, 28, 0, 452, 450, 1, 0, 0, 0, 453, 456, 1, 0, 0, 0, 454, 452, 1, 0, 0, 0, 454, 455, 1, 0, 0, 0, 455, 61, 1, 0, 0, 0, 456, 454, 1, 0, 0, 0, 457, 458, 7, 1, 0, 0, 458, 63, 1, 0, 0, 0, 459, 463, 5, 148, 0, 0, 460, 463, 3, 66, 33, 0, 461, 463, 3, 68, 34, 0, 462, 459, 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 462, 461, 1, 0, 0, 0, 463, 65, 1, 0, 0, 0, 464, 467, 5, 82, 0, 0, 465, 467, 5, 101, 0, 0, 466, 464, 1, 0, 0, 0, 466, 465, 1, 0, 0, 0, 467, 67, 1, 0, 0, 0, 468, 471, 5, 100, 0, 0, 469, 471, 5, 102, 0, 0, 470, 468, 1, 0, 0, 0, 470, 469, 1, 0, 0, 0, 471, 69, 1, 0, 0, 0, 472, 476, 3, 62, 31, 0, 473, 476, 3, 66, 33, 0, 474, 476, 3, 68, 34, 0, 475, 472, 1, 0, 0, 0, 475, 473, 1, 0, 0, 0, 475, 474, 1, 0, 0, 0, 476, 71, 1, 0, 0, 0, 477, 480, 3, 192, 96, 0, 478, 480, 3, 66, 33, 0, 479, 477, 1, 0, 0, 0, 479, 478, 1, 0, 0, 0, 480, 73, 1, 0, 0, 0, 481, 482, 5, 11, 0, 0, 482, 484, 3, 182, 91, 0, 483, 485, 3, 76, 38, 0, 484, 483, 1, 0, 0, 0, 484, 485, 1, 0, 0, 0, 485, 75, 1, 0, 0, 0, 486, 487, 4, 38, 8, 0, 487, 488, 5, 64, 0, 0, 488, 489, 3, 16, 8, 0, 489, 77, 1, 0, 0, 0, 490, 491, 5, 15, 0, 0, 491, 496, 3, 80, 40, 0, 492, 493, 5, 68, 0, 0, 493, 495, 3, 80, 40, 0, 494, 492, 1, 0, 0, 0, 495, 498, 1, 0, 0, 0, 496, 494, 1, 0, 0, 0, 496, 497, 1, 0, 0, 0, 497, 79, 1, 0, 0, 0, 498, 496, 1, 0, 0, 0, 499, 501, 3, 160, 80, 0, 500, 502, 7, 2, 0, 0, 501, 500, 1, 0, 0, 0, 501, 502, 1, 0, 0, 0, 502, 505, 1, 0, 0, 0, 503, 504, 5, 79, 0, 0, 504, 506, 7, 3, 0, 0, 505, 503, 1, 0, 0, 0, 505, 506, 1, 0, 0, 0, 506, 81, 1, 0, 0, 0, 507, 508, 5, 37, 0, 0, 508, 509, 3, 60, 30, 0, 509, 83, 1, 0, 0, 0, 510, 511, 5, 36, 0, 0, 511, 512, 3, 60, 30, 0, 512, 85, 1, 0, 0, 0, 513, 514, 5, 40, 0, 0, 514, 519, 3, 88, 44, 0, 515, 516, 5, 68, 0, 0, 516, 518, 3, 88, 44, 0, 517, 515, 1, 0, 0, 0, 518, 521, 1, 0, 0, 0, 519, 517, 1, 0, 0, 0, 519, 520, 1, 0, 0, 0, 520, 87, 1, 0, 0, 0, 521, 519, 1, 0, 0, 0, 522, 523, 3, 56, 28, 0, 523, 524, 5, 158, 0, 0, 524, 525, 3, 56, 28, 0, 525, 531, 1, 0, 0, 0, 526, 527, 3, 56, 28, 0, 527, 528, 5, 63, 0, 0, 528, 529, 3, 56, 28, 0, 529, 531, 1, 0, 0, 0, 530, 522, 1, 0, 0, 0, 530, 526, 1, 0, 0, 0, 531, 89, 1, 0, 0, 0, 532, 533, 5, 8, 0, 0, 533, 534, 3, 170, 85, 0, 534, 536, 3, 192, 96, 0, 535, 537, 3, 92, 46, 0, 536, 535, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 91, 1, 0, 0, 0, 538, 543, 3, 94, 47, 0, 539, 540, 5, 68, 0, 0, 540, 542, 3, 94, 47, 0, 541, 539, 1, 0, 0, 0, 542, 545, 1, 0, 0, 0, 543, 541, 1, 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 93, 1, 0, 0, 0, 545, 543, 1, 0, 0, 0, 546, 547, 3, 62, 31, 0, 547, 548, 5, 63, 0, 0, 548, 549, 3, 182, 91, 0, 549, 95, 1, 0, 0, 0, 550, 551, 5, 85, 0, 0, 551, 553, 3, 176, 88, 0, 552, 550, 1, 0, 0, 0, 552, 553, 1, 0, 0, 0, 553, 97, 1, 0, 0, 0, 554, 555, 5, 10, 0, 0, 555, 556, 3, 170, 85, 0, 556, 561, 3, 192, 96, 0, 557, 558, 5, 68, 0, 0, 558, 560, 3, 192, 96, 0, 559, 557, 1, 0, 0, 0, 560, 563, 1, 0, 0, 0, 561, 559, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 99, 1, 0, 0, 0, 563, 561, 1, 0, 0, 0, 564, 565, 5, 35, 0, 0, 565, 566, 3, 52, 26, 0, 566, 101, 1, 0, 0, 0, 567, 568, 5, 6, 0, 0, 568, 569, 3, 104, 52, 0, 569, 103, 1, 0, 0, 0, 570, 571, 5, 105, 0, 0, 571, 572, 3, 4, 2, 0, 572, 573, 5, 106, 0, 0, 573, 105, 1, 0, 0, 0, 574, 575, 5, 42, 0, 0, 575, 576, 5, 165, 0, 0, 576, 107, 1, 0, 0, 0, 577, 578, 5, 5, 0, 0, 578, 581, 3, 110, 55, 0, 579, 580, 5, 80, 0, 0, 580, 582, 3, 56, 28, 0, 581, 579, 1, 0, 0, 0, 581, 582, 1, 0, 0, 0, 582, 592, 1, 0, 0, 0, 583, 584, 5, 85, 0, 0, 584, 589, 3, 112, 56, 0, 585, 586, 5, 68, 0, 0, 586, 588, 3, 112, 56, 0, 587, 585, 1, 0, 0, 0, 588, 591, 1, 0, 0, 0, 589, 587, 1, 0, 0, 0, 589, 590, 1, 0, 0, 0, 590, 593, 1, 0, 0, 0, 591, 589, 1, 0, 0, 0, 592, 583, 1, 0, 0, 0, 592, 593, 1, 0, 0, 0, 593, 109, 1, 0, 0, 0, 594, 595, 7, 4, 0, 0, 595, 111, 1, 0, 0, 0, 596, 597, 3, 56, 28, 0, 597, 598, 5, 63, 0, 0, 598, 600, 1, 0, 0, 0, 599, 596, 1, 0, 0, 0, 599, 600, 1, 0, 0, 0, 600, 601, 1, 0, 0, 0, 601, 602, 3, 56, 28, 0, 602, 113, 1, 0, 0, 0, 603, 604, 5, 14, 0, 0, 604, 605, 3, 182, 91, 0, 605, 115, 1, 0, 0, 0, 606, 607, 5, 4, 0, 0, 607, 610, 3, 52, 26, 0, 608, 609, 5, 80, 0, 0, 609, 611, 3, 52, 26, 0, 610, 608, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 617, 1, 0, 0, 0, 612, 613, 5, 158, 0, 0, 613, 614, 3, 52, 26, 0, 614, 615, 5, 68, 0, 0, 615, 616, 3, 52, 26, 0, 616, 618, 1, 0, 0, 0, 617, 612, 1, 0, 0, 0, 617, 618, 1, 0, 0, 0, 618, 117, 1, 0, 0, 0, 619, 620, 5, 25, 0, 0, 620, 621, 3, 120, 60, 0, 621, 119, 1, 0, 0, 0, 622, 624, 3, 122, 61, 0, 623, 622, 1, 0, 0, 0, 624, 625, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 625, 626, 1, 0, 0, 0, 626, 121, 1, 0, 0, 0, 627, 628, 5, 105, 0, 0, 628, 629, 3, 124, 62, 0, 629, 630, 5, 106, 0, 0, 630, 123, 1, 0, 0, 0, 631, 632, 6, 62, -1, 0, 632, 633, 3, 126, 63, 0, 633, 639, 1, 0, 0, 0, 634, 635, 10, 1, 0, 0, 635, 636, 5, 57, 0, 0, 636, 638, 3, 126, 63, 0, 637, 634, 1, 0, 0, 0, 638, 641, 1, 0, 0, 0, 639, 637, 1, 0, 0, 0, 639, 640, 1, 0, 0, 0, 640, 125, 1, 0, 0, 0, 641, 639, 1, 0, 0, 0, 642, 643, 3, 8, 4, 0, 643, 127, 1, 0, 0, 0, 644, 648, 5, 12, 0, 0, 645, 646, 3, 52, 26, 0, 646, 647, 5, 63, 0, 0, 647, 649, 1, 0, 0, 0, 648, 645, 1, 0, 0, 0, 648, 649, 1, 0, 0, 0, 649, 650, 1, 0, 0, 0, 650, 651, 3, 182, 91, 0, 651, 652, 5, 80, 0, 0, 652, 653, 3, 16, 8, 0, 653, 654, 3, 96, 48, 0, 654, 129, 1, 0, 0, 0, 655, 659, 5, 7, 0, 0, 656, 657, 3, 52, 26, 0, 657, 658, 5, 63, 0, 0, 658, 660, 1, 0, 0, 0, 659, 656, 1, 0, 0, 0, 659, 660, 1, 0, 0, 0, 660, 661, 1, 0, 0, 0, 661, 662, 3, 170, 85, 0, 662, 663, 3, 96, 48, 0, 663, 131, 1, 0, 0, 0, 664, 665, 5, 27, 0, 0, 665, 666, 5, 126, 0, 0, 666, 669, 3, 48, 24, 0, 667, 668, 5, 64, 0, 0, 668, 670, 3, 16, 8, 0, 669, 667, 1, 0, 0, 0, 669, 670, 1, 0, 0, 0, 670, 678, 1, 0, 0, 0, 671, 672, 5, 28, 0, 0, 672, 675, 3, 48, 24, 0, 673, 674, 5, 64, 0, 0, 674, 676, 3, 16, 8, 0, 675, 673, 1, 0, 0, 0, 675, 676, 1, 0, 0, 0, 676, 678, 1, 0, 0, 0, 677, 664, 1, 0, 0, 0, 677, 671, 1, 0, 0, 0, 678, 133, 1, 0, 0, 0, 679, 681, 5, 26, 0, 0, 680, 682, 3, 62, 31, 0, 681, 680, 1, 0, 0, 0, 681, 682, 1, 0, 0, 0, 682, 686, 1, 0, 0, 0, 683, 685, 3, 136, 68, 0, 684, 683, 1, 0, 0, 0, 685, 688, 1, 0, 0, 0, 686, 684, 1, 0, 0, 0, 686, 687, 1, 0, 0, 0, 687, 135, 1, 0, 0, 0, 688, 686, 1, 0, 0, 0, 689, 690, 5, 121, 0, 0, 690, 691, 5, 64, 0, 0, 691, 701, 3, 52, 26, 0, 692, 693, 5, 122, 0, 0, 693, 694, 5, 64, 0, 0, 694, 701, 3, 138, 69, 0, 695, 696, 5, 120, 0, 0, 696, 697, 5, 64, 0, 0, 697, 701, 3, 52, 26, 0, 698, 699, 5, 85, 0, 0, 699, 701, 3, 176, 88, 0, 700, 689, 1, 0, 0, 0, 700, 692, 1, 0, 0, 0, 700, 695, 1, 0, 0, 0, 700, 698, 1, 0, 0, 0, 701, 137, 1, 0, 0, 0, 702, 707, 3, 52, 26, 0, 703, 704, 5, 68, 0, 0, 704, 706, 3, 52, 26, 0, 705, 703, 1, 0, 0, 0, 706, 709, 1, 0, 0, 0, 707, 705, 1, 0, 0, 0, 707, 708, 1, 0, 0, 0, 708, 139, 1, 0, 0, 0, 709, 707, 1, 0, 0, 0, 710, 711, 5, 19, 0, 0, 711, 141, 1, 0, 0, 0, 712, 713, 5, 21, 0, 0, 713, 143, 1, 0, 0, 0, 714, 715, 5, 33, 0, 0, 715, 716, 3, 32, 16, 0, 716, 717, 5, 80, 0, 0, 717, 718, 3, 60, 30, 0, 718, 145, 1, 0, 0, 0, 719, 720, 5, 38, 0, 0, 720, 721, 3, 60, 30, 0, 721, 147, 1, 0, 0, 0, 722, 723, 5, 18, 0, 0, 723, 724, 3, 52, 26, 0, 724, 725, 5, 63, 0, 0, 725, 726, 3, 170, 85, 0, 726, 149, 1, 0, 0, 0, 727, 728, 5, 20, 0, 0, 728, 729, 3, 52, 26, 0, 729, 730, 5, 63, 0, 0, 730, 731, 3, 170, 85, 0, 731, 151, 1, 0, 0, 0, 732, 733, 5, 41, 0, 0, 733, 734, 3, 154, 77, 0, 734, 735, 5, 67, 0, 0, 735, 153, 1, 0, 0, 0, 736, 737, 3, 62, 31, 0, 737, 740, 5, 63, 0, 0, 738, 741, 3, 182, 91, 0, 739, 741, 3, 176, 88, 0, 740, 738, 1, 0, 0, 0, 740, 739, 1, 0, 0, 0, 741, 155, 1, 0, 0, 0, 742, 744, 5, 34, 0, 0, 743, 745, 3, 158, 79, 0, 744, 743, 1, 0, 0, 0, 744, 745, 1, 0, 0, 0, 745, 746, 1, 0, 0, 0, 746, 747, 5, 80, 0, 0, 747, 748, 3, 52, 26, 0, 748, 749, 5, 141, 0, 0, 749, 750, 3, 190, 95, 0, 750, 751, 3, 96, 48, 0, 751, 157, 1, 0, 0, 0, 752, 755, 3, 66, 33, 0, 753, 755, 3, 170, 85, 0, 754, 752, 1, 0, 0, 0, 754, 753, 1, 0, 0, 0, 755, 159, 1, 0, 0, 0, 756, 757, 6, 80, -1, 0, 757, 758, 5, 77, 0, 0, 758, 786, 3, 160, 80, 8, 759, 786, 3, 166, 83, 0, 760, 786, 3, 162, 81, 0, 761, 763, 3, 166, 83, 0, 762, 764, 5, 77, 0, 0, 763, 762, 1, 0, 0, 0, 763, 764, 1, 0, 0, 0, 764, 765, 1, 0, 0, 0, 765, 766, 5, 73, 0, 0, 766, 767, 5, 105, 0, 0, 767, 772, 3, 166, 83, 0, 768, 769, 5, 68, 0, 0, 769, 771, 3, 166, 83, 0, 770, 768, 1, 0, 0, 0, 771, 774, 1, 0, 0, 0, 772, 770, 1, 0, 0, 0, 772, 773, 1, 0, 0, 0, 773, 775, 1, 0, 0, 0, 774, 772, 1, 0, 0, 0, 775, 776, 5, 106, 0, 0, 776, 786, 1, 0, 0, 0, 777, 778, 3, 166, 83, 0, 778, 780, 5, 74, 0, 0, 779, 781, 5, 77, 0, 0, 780, 779, 1, 0, 0, 0, 780, 781, 1, 0, 0, 0, 781, 782, 1, 0, 0, 0, 782, 783, 5, 78, 0, 0, 783, 786, 1, 0, 0, 0, 784, 786, 3, 164, 82, 0, 785, 756, 1, 0, 0, 0, 785, 759, 1, 0, 0, 0, 785, 760, 1, 0, 0, 0, 785, 761, 1, 0, 0, 0, 785, 777, 1, 0, 0, 0, 785, 784, 1, 0, 0, 0, 786, 795, 1, 0, 0, 0, 787, 788, 10, 5, 0, 0, 788, 789, 5, 61, 0, 0, 789, 794, 3, 160, 80, 6, 790, 791, 10, 4, 0, 0, 791, 792, 5, 81, 0, 0, 792, 794, 3, 160, 80, 5, 793, 787, 1, 0, 0, 0, 793, 790, 1, 0, 0, 0, 794, 797, 1, 0, 0, 0, 795, 793, 1, 0, 0, 0, 795, 796, 1, 0, 0, 0, 796, 161, 1, 0, 0, 0, 797, 795, 1, 0, 0, 0, 798, 800, 3, 166, 83, 0, 799, 801, 5, 77, 0, 0, 800, 799, 1, 0, 0, 0, 800, 801, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 802, 803, 5, 76, 0, 0, 803, 804, 3, 72, 36, 0, 804, 845, 1, 0, 0, 0, 805, 807, 3, 166, 83, 0, 806, 808, 5, 77, 0, 0, 807, 806, 1, 0, 0, 0, 807, 808, 1, 0, 0, 0, 808, 809, 1, 0, 0, 0, 809, 810, 5, 83, 0, 0, 810, 811, 3, 72, 36, 0, 811, 845, 1, 0, 0, 0, 812, 814, 3, 166, 83, 0, 813, 815, 5, 77, 0, 0, 814, 813, 1, 0, 0, 0, 814, 815, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 817, 5, 76, 0, 0, 817, 818, 5, 105, 0, 0, 818, 823, 3, 72, 36, 0, 819, 820, 5, 68, 0, 0, 820, 822, 3, 72, 36, 0, 821, 819, 1, 0, 0, 0, 822, 825, 1, 0, 0, 0, 823, 821, 1, 0, 0, 0, 823, 824, 1, 0, 0, 0, 824, 826, 1, 0, 0, 0, 825, 823, 1, 0, 0, 0, 826, 827, 5, 106, 0, 0, 827, 845, 1, 0, 0, 0, 828, 830, 3, 166, 83, 0, 829, 831, 5, 77, 0, 0, 830, 829, 1, 0, 0, 0, 830, 831, 1, 0, 0, 0, 831, 832, 1, 0, 0, 0, 832, 833, 5, 83, 0, 0, 833, 834, 5, 105, 0, 0, 834, 839, 3, 72, 36, 0, 835, 836, 5, 68, 0, 0, 836, 838, 3, 72, 36, 0, 837, 835, 1, 0, 0, 0, 838, 841, 1, 0, 0, 0, 839, 837, 1, 0, 0, 0, 839, 840, 1, 0, 0, 0, 840, 842, 1, 0, 0, 0, 841, 839, 1, 0, 0, 0, 842, 843, 5, 106, 0, 0, 843, 845, 1, 0, 0, 0, 844, 798, 1, 0, 0, 0, 844, 805, 1, 0, 0, 0, 844, 812, 1, 0, 0, 0, 844, 828, 1, 0, 0, 0, 845, 163, 1, 0, 0, 0, 846, 849, 3, 52, 26, 0, 847, 848, 5, 65, 0, 0, 848, 850, 3, 12, 6, 0, 849, 847, 1, 0, 0, 0, 849, 850, 1, 0, 0, 0, 850, 851, 1, 0, 0, 0, 851, 852, 5, 66, 0, 0, 852, 853, 3, 182, 91, 0, 853, 165, 1, 0, 0, 0, 854, 860, 3, 168, 84, 0, 855, 856, 3, 168, 84, 0, 856, 857, 3, 194, 97, 0, 857, 858, 3, 168, 84, 0, 858, 860, 1, 0, 0, 0, 859, 854, 1, 0, 0, 0, 859, 855, 1, 0, 0, 0, 860, 167, 1, 0, 0, 0, 861, 862, 6, 84, -1, 0, 862, 866, 3, 170, 85, 0, 863, 864, 7, 5, 0, 0, 864, 866, 3, 168, 84, 3, 865, 861, 1, 0, 0, 0, 865, 863, 1, 0, 0, 0, 866, 875, 1, 0, 0, 0, 867, 868, 10, 2, 0, 0, 868, 869, 7, 6, 0, 0, 869, 874, 3, 168, 84, 3, 870, 871, 10, 1, 0, 0, 871, 872, 7, 5, 0, 0, 872, 874, 3, 168, 84, 2, 873, 867, 1, 0, 0, 0, 873, 870, 1, 0, 0, 0, 874, 877, 1, 0, 0, 0, 875, 873, 1, 0, 0, 0, 875, 876, 1, 0, 0, 0, 876, 169, 1, 0, 0, 0, 877, 875, 1, 0, 0, 0, 878, 879, 6, 85, -1, 0, 879, 887, 3, 182, 91, 0, 880, 887, 3, 52, 26, 0, 881, 887, 3, 172, 86, 0, 882, 883, 5, 105, 0, 0, 883, 884, 3, 160, 80, 0, 884, 885, 5, 106, 0, 0, 885, 887, 1, 0, 0, 0, 886, 878, 1, 0, 0, 0, 886, 880, 1, 0, 0, 0, 886, 881, 1, 0, 0, 0, 886, 882, 1, 0, 0, 0, 887, 893, 1, 0, 0, 0, 888, 889, 10, 1, 0, 0, 889, 890, 5, 65, 0, 0, 890, 892, 3, 12, 6, 0, 891, 888, 1, 0, 0, 0, 892, 895, 1, 0, 0, 0, 893, 891, 1, 0, 0, 0, 893, 894, 1, 0, 0, 0, 894, 171, 1, 0, 0, 0, 895, 893, 1, 0, 0, 0, 896, 897, 3, 174, 87, 0, 897, 911, 5, 105, 0, 0, 898, 912, 5, 95, 0, 0, 899, 904, 3, 160, 80, 0, 900, 901, 5, 68, 0, 0, 901, 903, 3, 160, 80, 0, 902, 900, 1, 0, 0, 0, 903, 906, 1, 0, 0, 0, 904, 902, 1, 0, 0, 0, 904, 905, 1, 0, 0, 0, 905, 909, 1, 0, 0, 0, 906, 904, 1, 0, 0, 0, 907, 908, 5, 68, 0, 0, 908, 910, 3, 176, 88, 0, 909, 907, 1, 0, 0, 0, 909, 910, 1, 0, 0, 0, 910, 912, 1, 0, 0, 0, 911, 898, 1, 0, 0, 0, 911, 899, 1, 0, 0, 0, 911, 912, 1, 0, 0, 0, 912, 913, 1, 0, 0, 0, 913, 914, 5, 106, 0, 0, 914, 173, 1, 0, 0, 0, 915, 919, 3, 70, 35, 0, 916, 919, 5, 72, 0, 0, 917, 919, 5, 75, 0, 0, 918, 915, 1, 0, 0, 0, 918, 916, 1, 0, 0, 0, 918, 917, 1, 0, 0, 0, 919, 175, 1, 0, 0, 0, 920, 929, 5, 98, 0, 0, 921, 926, 3, 178, 89, 0, 922, 923, 5, 68, 0, 0, 923, 925, 3, 178, 89, 0, 924, 922, 1, 0, 0, 0, 925, 928, 1, 0, 0, 0, 926, 924, 1, 0, 0, 0, 926, 927, 1, 0, 0, 0, 927, 930, 1, 0, 0, 0, 928, 926, 1, 0, 0, 0, 929, 921, 1, 0, 0, 0, 929, 930, 1, 0, 0, 0, 930, 931, 1, 0, 0, 0, 931, 932, 5, 99, 0, 0, 932, 177, 1, 0, 0, 0, 933, 934, 3, 192, 96, 0, 934, 935, 5, 66, 0, 0, 935, 936, 3, 180, 90, 0, 936, 179, 1, 0, 0, 0, 937, 940, 3, 182, 91, 0, 938, 940, 3, 176, 88, 0, 939, 937, 1, 0, 0, 0, 939, 938, 1, 0, 0, 0, 940, 181, 1, 0, 0, 0, 941, 984, 5, 78, 0, 0, 942, 943, 3, 190, 95, 0, 943, 944, 5, 107, 0, 0, 944, 984, 1, 0, 0, 0, 945, 984, 3, 188, 94, 0, 946, 984, 3, 190, 95, 0, 947, 984, 3, 184, 92, 0, 948, 984, 3, 66, 33, 0, 949, 984, 3, 192, 96, 0, 950, 951, 5, 103, 0, 0, 951, 956, 3, 186, 93, 0, 952, 953, 5, 68, 0, 0, 953, 955, 3, 186, 93, 0, 954, 952, 1, 0, 0, 0, 955, 958, 1, 0, 0, 0, 956, 954, 1, 0, 0, 0, 956, 957, 1, 0, 0, 0, 957, 959, 1, 0, 0, 0, 958, 956, 1, 0, 0, 0, 959, 960, 5, 104, 0, 0, 960, 984, 1, 0, 0, 0, 961, 962, 5, 103, 0, 0, 962, 967, 3, 184, 92, 0, 963, 964, 5, 68, 0, 0, 964, 966, 3, 184, 92, 0, 965, 963, 1, 0, 0, 0, 966, 969, 1, 0, 0, 0, 967, 965, 1, 0, 0, 0, 967, 968, 1, 0, 0, 0, 968, 970, 1, 0, 0, 0, 969, 967, 1, 0, 0, 0, 970, 971, 5, 104, 0, 0, 971, 984, 1, 0, 0, 0, 972, 973, 5, 103, 0, 0, 973, 978, 3, 192, 96, 0, 974, 975, 5, 68, 0, 0, 975, 977, 3, 192, 96, 0, 976, 974, 1, 0, 0, 0, 977, 980, 1, 0, 0, 0, 978, 976, 1, 0, 0, 0, 978, 979, 1, 0, 0, 0, 979, 981, 1, 0, 0, 0, 980, 978, 1, 0, 0, 0, 981, 982, 5, 104, 0, 0, 982, 984, 1, 0, 0, 0, 983, 941, 1, 0, 0, 0, 983, 942, 1, 0, 0, 0, 983, 945, 1, 0, 0, 0, 983, 946, 1, 0, 0, 0, 983, 947, 1, 0, 0, 0, 983, 948, 1, 0, 0, 0, 983, 949, 1, 0, 0, 0, 983, 950, 1, 0, 0, 0, 983, 961, 1, 0, 0, 0, 983, 972, 1, 0, 0, 0, 984, 183, 1, 0, 0, 0, 985, 986, 7, 7, 0, 0, 986, 185, 1, 0, 0, 0, 987, 990, 3, 188, 94, 0, 988, 990, 3, 190, 95, 0, 989, 987, 1, 0, 0, 0, 989, 988, 1, 0, 0, 0, 990, 187, 1, 0, 0, 0, 991, 993, 7, 5, 0, 0, 992, 991, 1, 0, 0, 0, 992, 993, 1, 0, 0, 0, 993, 994, 1, 0, 0, 0, 994, 995, 5, 60, 0, 0, 995, 189, 1, 0, 0, 0, 996, 998, 7, 5, 0, 0, 997, 996, 1, 0, 0, 0, 997, 998, 1, 0, 0, 0, 998, 999, 1, 0, 0, 0, 999, 1000, 5, 59, 0, 0, 1000, 191, 1, 0, 0, 0, 1001, 1002, 5, 58, 0, 0, 1002, 193, 1, 0, 0, 0, 1003, 1004, 7, 8, 0, 0, 1004, 195, 1, 0, 0, 0, 1005, 1006, 7, 9, 0, 0, 1006, 1007, 5, 130, 0, 0, 1007, 1008, 3, 198, 99, 0, 1008, 1009, 3, 200, 100, 0, 1009, 197, 1, 0, 0, 0, 1010, 1011, 4, 99, 15, 0, 1011, 1013, 3, 32, 16, 0, 1012, 1014, 5, 158, 0, 0, 1013, 1012, 1, 0, 0, 0, 1013, 1014, 1, 0, 0, 0, 1014, 1015, 1, 0, 0, 0, 1015, 1016, 5, 113, 0, 0, 1016, 1019, 1, 0, 0, 0, 1017, 1019, 3, 32, 16, 0, 1018, 1010, 1, 0, 0, 0, 1018, 1017, 1, 0, 0, 0, 1019, 199, 1, 0, 0, 0, 1020, 1021, 5, 80, 0, 0, 1021, 1026, 3, 160, 80, 0, 1022, 1023, 5, 68, 0, 0, 1023, 1025, 3, 160, 80, 0, 1024, 1022, 1, 0, 0, 0, 1025, 1028, 1, 0, 0, 0, 1026, 1024, 1, 0, 0, 0, 1026, 1027, 1, 0, 0, 0, 1027, 201, 1, 0, 0, 0, 1028, 1026, 1, 0, 0, 0, 1029, 1033, 5, 39, 0, 0, 1030, 1032, 3, 206, 103, 0, 1031, 1030, 1, 0, 0, 0, 1032, 1035, 1, 0, 0, 0, 1033, 1031, 1, 0, 0, 0, 1033, 1034, 1, 0, 0, 0, 1034, 1039, 1, 0, 0, 0, 1035, 1033, 1, 0, 0, 0, 1036, 1037, 3, 204, 102, 0, 1037, 1038, 5, 63, 0, 0, 1038, 1040, 1, 0, 0, 0, 1039, 1036, 1, 0, 0, 0, 1039, 1040, 1, 0, 0, 0, 1040, 1041, 1, 0, 0, 0, 1041, 1043, 5, 105, 0, 0, 1042, 1044, 3, 214, 107, 0, 1043, 1042, 1, 0, 0, 0, 1044, 1045, 1, 0, 0, 0, 1045, 1043, 1, 0, 0, 0, 1045, 1046, 1, 0, 0, 0, 1046, 1047, 1, 0, 0, 0, 1047, 1048, 5, 106, 0, 0, 1048, 1062, 1, 0, 0, 0, 1049, 1053, 5, 39, 0, 0, 1050, 1052, 3, 206, 103, 0, 1051, 1050, 1, 0, 0, 0, 1052, 1055, 1, 0, 0, 0, 1053, 1051, 1, 0, 0, 0, 1053, 1054, 1, 0, 0, 0, 1054, 1057, 1, 0, 0, 0, 1055, 1053, 1, 0, 0, 0, 1056, 1058, 3, 214, 107, 0, 1057, 1056, 1, 0, 0, 0, 1058, 1059, 1, 0, 0, 0, 1059, 1057, 1, 0, 0, 0, 1059, 1060, 1, 0, 0, 0, 1060, 1062, 1, 0, 0, 0, 1061, 1029, 1, 0, 0, 0, 1061, 1049, 1, 0, 0, 0, 1062, 203, 1, 0, 0, 0, 1063, 1064, 7, 1, 0, 0, 1064, 205, 1, 0, 0, 0, 1065, 1066, 3, 208, 104, 0, 1066, 1067, 5, 63, 0, 0, 1067, 1068, 3, 210, 105, 0, 1068, 207, 1, 0, 0, 0, 1069, 1070, 7, 10, 0, 0, 1070, 209, 1, 0, 0, 0, 1071, 1076, 3, 216, 108, 0, 1072, 1073, 5, 68, 0, 0, 1073, 1075, 3, 216, 108, 0, 1074, 1072, 1, 0, 0, 0, 1075, 1078, 1, 0, 0, 0, 1076, 1074, 1, 0, 0, 0, 1076, 1077, 1, 0, 0, 0, 1077, 1082, 1, 0, 0, 0, 1078, 1076, 1, 0, 0, 0, 1079, 1082, 5, 108, 0, 0, 1080, 1082, 5, 101, 0, 0, 1081, 1071, 1, 0, 0, 0, 1081, 1079, 1, 0, 0, 0, 1081, 1080, 1, 0, 0, 0, 1082, 211, 1, 0, 0, 0, 1083, 1084, 7, 11, 0, 0, 1084, 213, 1, 0, 0, 0, 1085, 1087, 3, 212, 106, 0, 1086, 1085, 1, 0, 0, 0, 1087, 1088, 1, 0, 0, 0, 1088, 1086, 1, 0, 0, 0, 1088, 1089, 1, 0, 0, 0, 1089, 1099, 1, 0, 0, 0, 1090, 1094, 5, 105, 0, 0, 1091, 1093, 3, 214, 107, 0, 1092, 1091, 1, 0, 0, 0, 1093, 1096, 1, 0, 0, 0, 1094, 1092, 1, 0, 0, 0, 1094, 1095, 1, 0, 0, 0, 1095, 1097, 1, 0, 0, 0, 1096, 1094, 1, 0, 0, 0, 1097, 1099, 5, 106, 0, 0, 1098, 1086, 1, 0, 0, 0, 1098, 1090, 1, 0, 0, 0, 1099, 215, 1, 0, 0, 0, 1100, 1101, 3, 218, 109, 0, 1101, 1102, 5, 66, 0, 0, 1102, 1103, 3, 222, 111, 0, 1103, 1110, 1, 0, 0, 0, 1104, 1105, 3, 222, 111, 0, 1105, 1106, 5, 65, 0, 0, 1106, 1107, 3, 220, 110, 0, 1107, 1110, 1, 0, 0, 0, 1108, 1110, 3, 224, 112, 0, 1109, 1100, 1, 0, 0, 0, 1109, 1104, 1, 0, 0, 0, 1109, 1108, 1, 0, 0, 0, 1110, 217, 1, 0, 0, 0, 1111, 1112, 7, 12, 0, 0, 1112, 219, 1, 0, 0, 0, 1113, 1114, 7, 12, 0, 0, 1114, 221, 1, 0, 0, 0, 1115, 1116, 7, 12, 0, 0, 1116, 223, 1, 0, 0, 0, 1117, 1118, 7, 13, 0, 0, 1118, 225, 1, 0, 0, 0, 109, 229, 246, 258, 289, 304, 310, 329, 333, 338, 346, 354, 359, 362, 378, 386, 390, 397, 403, 408, 417, 424, 430, 439, 446, 454, 462, 466, 470, 475, 479, 484, 496, 501, 505, 519, 530, 536, 543, 552, 561, 581, 589, 592, 599, 610, 617, 625, 639, 648, 659, 669, 675, 677, 681, 686, 700, 707, 740, 744, 754, 763, 772, 780, 785, 793, 795, 800, 807, 814, 823, 830, 839, 844, 849, 859, 865, 873, 875, 886, 893, 904, 909, 911, 918, 926, 929, 939, 956, 967, 978, 983, 989, 992, 997, 1013, 1018, 1026, 1033, 1039, 1045, 1053, 1059, 1061, 1076, 1081, 1088, 1094, 1098, 1109] \ 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 2e661185ece69..ad93d856c336c 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 @@ -72,31 +72,31 @@ public class EsqlBaseParser extends ParserConfig { RULE_qualifiedNamePattern = 28, RULE_fieldNamePattern = 29, RULE_qualifiedNamePatterns = 30, RULE_identifier = 31, RULE_identifierPattern = 32, RULE_parameter = 33, RULE_doubleParameter = 34, RULE_identifierOrParameter = 35, RULE_stringOrParameter = 36, - RULE_limitCommand = 37, RULE_sortCommand = 38, RULE_orderExpression = 39, - RULE_keepCommand = 40, RULE_dropCommand = 41, RULE_renameCommand = 42, - RULE_renameClause = 43, RULE_dissectCommand = 44, RULE_dissectCommandOptions = 45, - RULE_dissectCommandOption = 46, RULE_commandNamedParameters = 47, RULE_grokCommand = 48, - RULE_mvExpandCommand = 49, RULE_explainCommand = 50, RULE_subqueryExpression = 51, - RULE_showCommand = 52, RULE_enrichCommand = 53, RULE_enrichPolicyName = 54, - RULE_enrichWithClause = 55, RULE_sampleCommand = 56, RULE_changePointCommand = 57, - RULE_forkCommand = 58, RULE_forkSubQueries = 59, RULE_forkSubQuery = 60, - RULE_forkSubQueryCommand = 61, RULE_forkSubQueryProcessingCommand = 62, - RULE_rerankCommand = 63, RULE_completionCommand = 64, RULE_inlineStatsCommand = 65, - RULE_fuseCommand = 66, RULE_fuseConfiguration = 67, RULE_fuseKeyByFields = 68, - RULE_metricsInfoCommand = 69, RULE_tsInfoCommand = 70, RULE_lookupCommand = 71, - RULE_insistCommand = 72, RULE_uriPartsCommand = 73, RULE_registeredDomainCommand = 74, - RULE_setCommand = 75, RULE_setField = 76, RULE_mmrCommand = 77, RULE_mmrQueryVectorParams = 78, - RULE_booleanExpression = 79, RULE_regexBooleanExpression = 80, RULE_matchBooleanExpression = 81, - RULE_valueExpression = 82, RULE_operatorExpression = 83, RULE_primaryExpression = 84, - RULE_functionExpression = 85, RULE_functionName = 86, RULE_mapExpression = 87, - RULE_entryExpression = 88, RULE_mapValue = 89, RULE_constant = 90, RULE_booleanValue = 91, - RULE_numericValue = 92, RULE_decimalValue = 93, RULE_integerValue = 94, - RULE_string = 95, RULE_comparisonOperator = 96, RULE_joinCommand = 97, - RULE_joinTarget = 98, RULE_joinCondition = 99, RULE_promqlCommand = 100, - RULE_valueName = 101, RULE_promqlParam = 102, RULE_promqlParamName = 103, - RULE_promqlParamValue = 104, RULE_promqlQueryContent = 105, RULE_promqlQueryPart = 106, - RULE_promqlIndexPattern = 107, RULE_promqlClusterString = 108, RULE_promqlSelectorString = 109, - RULE_promqlUnquotedIndexString = 110, RULE_promqlIndexString = 111; + RULE_limitCommand = 37, RULE_limitByGroupKey = 38, RULE_sortCommand = 39, + RULE_orderExpression = 40, RULE_keepCommand = 41, RULE_dropCommand = 42, + RULE_renameCommand = 43, RULE_renameClause = 44, RULE_dissectCommand = 45, + RULE_dissectCommandOptions = 46, RULE_dissectCommandOption = 47, RULE_commandNamedParameters = 48, + RULE_grokCommand = 49, RULE_mvExpandCommand = 50, RULE_explainCommand = 51, + RULE_subqueryExpression = 52, RULE_showCommand = 53, RULE_enrichCommand = 54, + RULE_enrichPolicyName = 55, RULE_enrichWithClause = 56, RULE_sampleCommand = 57, + RULE_changePointCommand = 58, RULE_forkCommand = 59, RULE_forkSubQueries = 60, + RULE_forkSubQuery = 61, RULE_forkSubQueryCommand = 62, RULE_forkSubQueryProcessingCommand = 63, + RULE_rerankCommand = 64, RULE_completionCommand = 65, RULE_inlineStatsCommand = 66, + RULE_fuseCommand = 67, RULE_fuseConfiguration = 68, RULE_fuseKeyByFields = 69, + RULE_metricsInfoCommand = 70, RULE_tsInfoCommand = 71, RULE_lookupCommand = 72, + RULE_insistCommand = 73, RULE_uriPartsCommand = 74, RULE_registeredDomainCommand = 75, + RULE_setCommand = 76, RULE_setField = 77, RULE_mmrCommand = 78, RULE_mmrQueryVectorParams = 79, + RULE_booleanExpression = 80, RULE_regexBooleanExpression = 81, RULE_matchBooleanExpression = 82, + RULE_valueExpression = 83, RULE_operatorExpression = 84, RULE_primaryExpression = 85, + RULE_functionExpression = 86, RULE_functionName = 87, RULE_mapExpression = 88, + RULE_entryExpression = 89, RULE_mapValue = 90, RULE_constant = 91, RULE_booleanValue = 92, + RULE_numericValue = 93, RULE_decimalValue = 94, RULE_integerValue = 95, + RULE_string = 96, RULE_comparisonOperator = 97, RULE_joinCommand = 98, + RULE_joinTarget = 99, RULE_joinCondition = 100, RULE_promqlCommand = 101, + RULE_valueName = 102, RULE_promqlParam = 103, RULE_promqlParamName = 104, + RULE_promqlParamValue = 105, RULE_promqlQueryContent = 106, RULE_promqlQueryPart = 107, + RULE_promqlIndexPattern = 108, RULE_promqlClusterString = 109, RULE_promqlSelectorString = 110, + RULE_promqlUnquotedIndexString = 111, RULE_promqlIndexString = 112; private static String[] makeRuleNames() { return new String[] { "statements", "singleStatement", "query", "sourceCommand", "processingCommand", @@ -107,9 +107,9 @@ private static String[] makeRuleNames() { "statsCommand", "aggFields", "aggField", "qualifiedName", "fieldName", "qualifiedNamePattern", "fieldNamePattern", "qualifiedNamePatterns", "identifier", "identifierPattern", "parameter", "doubleParameter", "identifierOrParameter", - "stringOrParameter", "limitCommand", "sortCommand", "orderExpression", - "keepCommand", "dropCommand", "renameCommand", "renameClause", "dissectCommand", - "dissectCommandOptions", "dissectCommandOption", "commandNamedParameters", + "stringOrParameter", "limitCommand", "limitByGroupKey", "sortCommand", + "orderExpression", "keepCommand", "dropCommand", "renameCommand", "renameClause", + "dissectCommand", "dissectCommandOptions", "dissectCommandOption", "commandNamedParameters", "grokCommand", "mvExpandCommand", "explainCommand", "subqueryExpression", "showCommand", "enrichCommand", "enrichPolicyName", "enrichWithClause", "sampleCommand", "changePointCommand", "forkCommand", "forkSubQueries", @@ -281,25 +281,25 @@ public final StatementsContext statements() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(227); + setState(229); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,0,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(224); + setState(226); setCommand(); } } } - setState(229); + setState(231); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,0,_ctx); } - setState(230); + setState(232); singleStatement(); - setState(231); + setState(233); match(EOF); } } @@ -346,9 +346,9 @@ public final SingleStatementContext singleStatement() throws RecognitionExceptio try { enterOuterAlt(_localctx, 1); { - setState(233); + setState(235); query(0); - setState(234); + setState(236); match(EOF); } } @@ -444,11 +444,11 @@ private QueryContext query(int _p) throws RecognitionException { _ctx = _localctx; _prevctx = _localctx; - setState(237); + setState(239); sourceCommand(); } _ctx.stop = _input.LT(-1); - setState(244); + setState(246); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,1,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { @@ -459,16 +459,16 @@ private QueryContext query(int _p) throws RecognitionException { { _localctx = new CompositeQueryContext(new QueryContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_query); - setState(239); + setState(241); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(240); + setState(242); match(PIPE); - setState(241); + setState(243); processingCommand(); } } } - setState(246); + setState(248); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,1,_ctx); } @@ -532,59 +532,59 @@ public final SourceCommandContext sourceCommand() throws RecognitionException { SourceCommandContext _localctx = new SourceCommandContext(_ctx, getState()); enterRule(_localctx, 6, RULE_sourceCommand); try { - setState(256); + setState(258); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(247); + setState(249); fromCommand(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(248); + setState(250); rowCommand(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(249); + setState(251); showCommand(); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(250); + setState(252); timeSeriesCommand(); } break; case 5: enterOuterAlt(_localctx, 5); { - setState(251); + setState(253); promqlCommand(); } break; case 6: enterOuterAlt(_localctx, 6); { - setState(252); + setState(254); if (!(this.isDevVersion())) throw new FailedPredicateException(this, "this.isDevVersion()"); - setState(253); + setState(255); explainCommand(); } break; case 7: enterOuterAlt(_localctx, 7); { - setState(254); + setState(256); if (!(this.isDevVersion())) throw new FailedPredicateException(this, "this.isDevVersion()"); - setState(255); + setState(257); externalCommand(); } break; @@ -708,199 +708,199 @@ public final ProcessingCommandContext processingCommand() throws RecognitionExce ProcessingCommandContext _localctx = new ProcessingCommandContext(_ctx, getState()); enterRule(_localctx, 8, RULE_processingCommand); try { - setState(287); + setState(289); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(258); + setState(260); evalCommand(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(259); + setState(261); whereCommand(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(260); + setState(262); keepCommand(); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(261); + setState(263); limitCommand(); } break; case 5: enterOuterAlt(_localctx, 5); { - setState(262); + setState(264); statsCommand(); } break; case 6: enterOuterAlt(_localctx, 6); { - setState(263); + setState(265); sortCommand(); } break; case 7: enterOuterAlt(_localctx, 7); { - setState(264); + setState(266); dropCommand(); } break; case 8: enterOuterAlt(_localctx, 8); { - setState(265); + setState(267); renameCommand(); } break; case 9: enterOuterAlt(_localctx, 9); { - setState(266); + setState(268); dissectCommand(); } break; case 10: enterOuterAlt(_localctx, 10); { - setState(267); + setState(269); grokCommand(); } break; case 11: enterOuterAlt(_localctx, 11); { - setState(268); + setState(270); enrichCommand(); } break; case 12: enterOuterAlt(_localctx, 12); { - setState(269); + setState(271); mvExpandCommand(); } break; case 13: enterOuterAlt(_localctx, 13); { - setState(270); + setState(272); joinCommand(); } break; case 14: enterOuterAlt(_localctx, 14); { - setState(271); + setState(273); changePointCommand(); } break; case 15: enterOuterAlt(_localctx, 15); { - setState(272); + setState(274); completionCommand(); } break; case 16: enterOuterAlt(_localctx, 16); { - setState(273); + setState(275); sampleCommand(); } break; case 17: enterOuterAlt(_localctx, 17); { - setState(274); + setState(276); forkCommand(); } break; case 18: enterOuterAlt(_localctx, 18); { - setState(275); + setState(277); rerankCommand(); } break; case 19: enterOuterAlt(_localctx, 19); { - setState(276); + setState(278); inlineStatsCommand(); } break; case 20: enterOuterAlt(_localctx, 20); { - setState(277); + setState(279); fuseCommand(); } break; case 21: enterOuterAlt(_localctx, 21); { - setState(278); + setState(280); uriPartsCommand(); } break; case 22: enterOuterAlt(_localctx, 22); { - setState(279); + setState(281); metricsInfoCommand(); } break; case 23: enterOuterAlt(_localctx, 23); { - setState(280); + setState(282); registeredDomainCommand(); } break; case 24: enterOuterAlt(_localctx, 24); { - setState(281); + setState(283); tsInfoCommand(); } break; case 25: enterOuterAlt(_localctx, 25); { - setState(282); + setState(284); mmrCommand(); } break; case 26: enterOuterAlt(_localctx, 26); { - setState(283); + setState(285); if (!(this.isDevVersion())) throw new FailedPredicateException(this, "this.isDevVersion()"); - setState(284); + setState(286); lookupCommand(); } break; case 27: enterOuterAlt(_localctx, 27); { - setState(285); + setState(287); if (!(this.isDevVersion())) throw new FailedPredicateException(this, "this.isDevVersion()"); - setState(286); + setState(288); insistCommand(); } break; @@ -949,9 +949,9 @@ public final WhereCommandContext whereCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(289); + setState(291); match(WHERE); - setState(290); + setState(292); booleanExpression(0); } } @@ -1009,7 +1009,7 @@ public final DataTypeContext dataType() throws RecognitionException { _localctx = new ToDataTypeContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(292); + setState(294); identifier(); } } @@ -1056,9 +1056,9 @@ public final RowCommandContext rowCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(294); + setState(296); match(ROW); - setState(295); + setState(297); fields(); } } @@ -1112,23 +1112,23 @@ public final FieldsContext fields() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(297); + setState(299); field(); - setState(302); + setState(304); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,4,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(298); + setState(300); match(COMMA); - setState(299); + setState(301); field(); } } } - setState(304); + setState(306); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,4,_ctx); } @@ -1180,19 +1180,19 @@ public final FieldContext field() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(308); + setState(310); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { case 1: { - setState(305); + setState(307); qualifiedName(); - setState(306); + setState(308); match(ASSIGN); } break; } - setState(310); + setState(312); booleanExpression(0); } } @@ -1239,9 +1239,9 @@ public final FromCommandContext fromCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(312); + setState(314); match(FROM); - setState(313); + setState(315); indexPatternAndMetadataFields(); } } @@ -1288,9 +1288,9 @@ public final TimeSeriesCommandContext timeSeriesCommand() throws RecognitionExce try { enterOuterAlt(_localctx, 1); { - setState(315); + setState(317); match(TS); - setState(316); + setState(318); indexPatternAndMetadataFields(); } } @@ -1340,11 +1340,11 @@ public final ExternalCommandContext externalCommand() throws RecognitionExceptio try { enterOuterAlt(_localctx, 1); { - setState(318); + setState(320); match(DEV_EXTERNAL); - setState(319); + setState(321); stringOrParameter(); - setState(320); + setState(322); commandNamedParameters(); } } @@ -1401,32 +1401,32 @@ public final IndexPatternAndMetadataFieldsContext indexPatternAndMetadataFields( int _alt; enterOuterAlt(_localctx, 1); { - setState(322); + setState(324); indexPatternOrSubquery(); - setState(327); + setState(329); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,6,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(323); + setState(325); match(COMMA); - setState(324); + setState(326); indexPatternOrSubquery(); } } } - setState(329); + setState(331); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,6,_ctx); } - setState(331); + setState(333); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) { case 1: { - setState(330); + setState(332); metadata(); } break; @@ -1476,22 +1476,22 @@ public final IndexPatternOrSubqueryContext indexPatternOrSubquery() throws Recog IndexPatternOrSubqueryContext _localctx = new IndexPatternOrSubqueryContext(_ctx, getState()); enterRule(_localctx, 28, RULE_indexPatternOrSubquery); try { - setState(336); + setState(338); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(333); + setState(335); indexPattern(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(334); + setState(336); if (!(this.isDevVersion())) throw new FailedPredicateException(this, "this.isDevVersion()"); - setState(335); + setState(337); subquery(); } break; @@ -1552,27 +1552,27 @@ public final SubqueryContext subquery() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(338); + setState(340); match(LP); - setState(339); + setState(341); fromCommand(); - setState(344); + setState(346); _errHandler.sync(this); _la = _input.LA(1); while (_la==PIPE) { { { - setState(340); + setState(342); match(PIPE); - setState(341); + setState(343); processingCommand(); } } - setState(346); + setState(348); _errHandler.sync(this); _la = _input.LA(1); } - setState(347); + setState(349); match(RP); } } @@ -1627,34 +1627,34 @@ public final IndexPatternContext indexPattern() throws RecognitionException { IndexPatternContext _localctx = new IndexPatternContext(_ctx, getState()); enterRule(_localctx, 32, RULE_indexPattern); try { - setState(360); + setState(362); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(352); + setState(354); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { case 1: { - setState(349); + setState(351); clusterString(); - setState(350); + setState(352); match(COLON); } break; } - setState(354); + setState(356); unquotedIndexString(); - setState(357); + setState(359); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) { case 1: { - setState(355); + setState(357); match(CAST_OP); - setState(356); + setState(358); selectorString(); } break; @@ -1664,7 +1664,7 @@ public final IndexPatternContext indexPattern() throws RecognitionException { case 2: enterOuterAlt(_localctx, 2); { - setState(359); + setState(361); indexString(); } break; @@ -1710,7 +1710,7 @@ public final ClusterStringContext clusterString() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(362); + setState(364); match(UNQUOTED_SOURCE); } } @@ -1754,7 +1754,7 @@ public final SelectorStringContext selectorString() throws RecognitionException try { enterOuterAlt(_localctx, 1); { - setState(364); + setState(366); match(UNQUOTED_SOURCE); } } @@ -1798,7 +1798,7 @@ public final UnquotedIndexStringContext unquotedIndexString() throws Recognition try { enterOuterAlt(_localctx, 1); { - setState(366); + setState(368); match(UNQUOTED_SOURCE); } } @@ -1844,7 +1844,7 @@ public final IndexStringContext indexString() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(368); + setState(370); _la = _input.LA(1); if ( !(_la==QUOTED_STRING || _la==UNQUOTED_SOURCE) ) { _errHandler.recoverInline(this); @@ -1905,25 +1905,25 @@ public final MetadataContext metadata() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(370); + setState(372); match(METADATA); - setState(371); + setState(373); match(UNQUOTED_SOURCE); - setState(376); + setState(378); _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(372); + setState(374); match(COMMA); - setState(373); + setState(375); match(UNQUOTED_SOURCE); } } } - setState(378); + setState(380); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,13,_ctx); } @@ -1972,9 +1972,9 @@ public final EvalCommandContext evalCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(379); + setState(381); match(EVAL); - setState(380); + setState(382); fields(); } } @@ -2027,26 +2027,26 @@ public final StatsCommandContext statsCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(382); - match(STATS); setState(384); + match(STATS); + setState(386); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { case 1: { - setState(383); + setState(385); ((StatsCommandContext)_localctx).stats = aggFields(); } break; } - setState(388); + setState(390); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { case 1: { - setState(386); + setState(388); match(BY); - setState(387); + setState(389); ((StatsCommandContext)_localctx).grouping = fields(); } break; @@ -2103,23 +2103,23 @@ public final AggFieldsContext aggFields() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(390); + setState(392); aggField(); - setState(395); + setState(397); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,16,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(391); + setState(393); match(COMMA); - setState(392); + setState(394); aggField(); } } } - setState(397); + setState(399); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,16,_ctx); } @@ -2171,16 +2171,16 @@ public final AggFieldContext aggField() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(398); + setState(400); field(); - setState(401); + setState(403); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) { case 1: { - setState(399); + setState(401); match(WHERE); - setState(400); + setState(402); booleanExpression(0); } break; @@ -2240,42 +2240,42 @@ public final QualifiedNameContext qualifiedName() throws RecognitionException { enterRule(_localctx, 52, RULE_qualifiedName); int _la; try { - setState(415); + setState(417); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(403); + setState(405); if (!(this.isDevVersion())) throw new FailedPredicateException(this, "this.isDevVersion()"); - setState(404); - match(OPENING_BRACKET); setState(406); + match(OPENING_BRACKET); + setState(408); _errHandler.sync(this); _la = _input.LA(1); if (_la==UNQUOTED_IDENTIFIER) { { - setState(405); + setState(407); ((QualifiedNameContext)_localctx).qualifier = match(UNQUOTED_IDENTIFIER); } } - setState(408); + setState(410); match(CLOSING_BRACKET); - setState(409); + setState(411); match(DOT); - setState(410); + setState(412); match(OPENING_BRACKET); - setState(411); + setState(413); ((QualifiedNameContext)_localctx).name = fieldName(); - setState(412); + setState(414); match(CLOSING_BRACKET); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(414); + setState(416); ((QualifiedNameContext)_localctx).name = fieldName(); } break; @@ -2331,23 +2331,23 @@ public final FieldNameContext fieldName() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(417); + setState(419); identifierOrParameter(); - setState(422); + setState(424); _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(418); + setState(420); match(DOT); - setState(419); + setState(421); identifierOrParameter(); } } } - setState(424); + setState(426); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,20,_ctx); } @@ -2406,42 +2406,42 @@ public final QualifiedNamePatternContext qualifiedNamePattern() throws Recogniti enterRule(_localctx, 56, RULE_qualifiedNamePattern); int _la; try { - setState(437); + setState(439); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,22,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(425); + setState(427); if (!(this.isDevVersion())) throw new FailedPredicateException(this, "this.isDevVersion()"); - setState(426); - match(OPENING_BRACKET); setState(428); + match(OPENING_BRACKET); + setState(430); _errHandler.sync(this); _la = _input.LA(1); if (_la==ID_PATTERN) { { - setState(427); + setState(429); ((QualifiedNamePatternContext)_localctx).qualifier = match(ID_PATTERN); } } - setState(430); + setState(432); match(CLOSING_BRACKET); - setState(431); + setState(433); match(DOT); - setState(432); + setState(434); match(OPENING_BRACKET); - setState(433); + setState(435); ((QualifiedNamePatternContext)_localctx).name = fieldNamePattern(); - setState(434); + setState(436); match(CLOSING_BRACKET); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(436); + setState(438); ((QualifiedNamePatternContext)_localctx).name = fieldNamePattern(); } break; @@ -2498,23 +2498,23 @@ public final FieldNamePatternContext fieldNamePattern() throws RecognitionExcept enterOuterAlt(_localctx, 1); { { - setState(439); + setState(441); identifierPattern(); - setState(444); + setState(446); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,23,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(440); + setState(442); match(DOT); - setState(441); + setState(443); identifierPattern(); } } } - setState(446); + setState(448); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,23,_ctx); } @@ -2571,23 +2571,23 @@ public final QualifiedNamePatternsContext qualifiedNamePatterns() throws Recogni int _alt; enterOuterAlt(_localctx, 1); { - setState(447); + setState(449); qualifiedNamePattern(); - setState(452); + setState(454); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,24,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(448); + setState(450); match(COMMA); - setState(449); + setState(451); qualifiedNamePattern(); } } } - setState(454); + setState(456); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,24,_ctx); } @@ -2635,7 +2635,7 @@ public final IdentifierContext identifier() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(455); + setState(457); _la = _input.LA(1); if ( !(_la==UNQUOTED_IDENTIFIER || _la==QUOTED_IDENTIFIER) ) { _errHandler.recoverInline(this); @@ -2691,13 +2691,13 @@ public final IdentifierPatternContext identifierPattern() throws RecognitionExce IdentifierPatternContext _localctx = new IdentifierPatternContext(_ctx, getState()); enterRule(_localctx, 64, RULE_identifierPattern); try { - setState(460); + setState(462); _errHandler.sync(this); switch (_input.LA(1)) { case ID_PATTERN: enterOuterAlt(_localctx, 1); { - setState(457); + setState(459); match(ID_PATTERN); } break; @@ -2705,7 +2705,7 @@ public final IdentifierPatternContext identifierPattern() throws RecognitionExce case NAMED_OR_POSITIONAL_PARAM: enterOuterAlt(_localctx, 2); { - setState(458); + setState(460); parameter(); } break; @@ -2713,7 +2713,7 @@ public final IdentifierPatternContext identifierPattern() throws RecognitionExce case NAMED_OR_POSITIONAL_DOUBLE_PARAMS: enterOuterAlt(_localctx, 3); { - setState(459); + setState(461); doubleParameter(); } break; @@ -2789,14 +2789,14 @@ public final ParameterContext parameter() throws RecognitionException { ParameterContext _localctx = new ParameterContext(_ctx, getState()); enterRule(_localctx, 66, RULE_parameter); try { - setState(464); + setState(466); _errHandler.sync(this); switch (_input.LA(1)) { case PARAM: _localctx = new InputParamContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(462); + setState(464); match(PARAM); } break; @@ -2804,7 +2804,7 @@ public final ParameterContext parameter() throws RecognitionException { _localctx = new InputNamedOrPositionalParamContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(463); + setState(465); match(NAMED_OR_POSITIONAL_PARAM); } break; @@ -2880,14 +2880,14 @@ public final DoubleParameterContext doubleParameter() throws RecognitionExceptio DoubleParameterContext _localctx = new DoubleParameterContext(_ctx, getState()); enterRule(_localctx, 68, RULE_doubleParameter); try { - setState(468); + setState(470); _errHandler.sync(this); switch (_input.LA(1)) { case DOUBLE_PARAMS: _localctx = new InputDoubleParamsContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(466); + setState(468); match(DOUBLE_PARAMS); } break; @@ -2895,7 +2895,7 @@ public final DoubleParameterContext doubleParameter() throws RecognitionExceptio _localctx = new InputNamedOrPositionalDoubleParamsContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(467); + setState(469); match(NAMED_OR_POSITIONAL_DOUBLE_PARAMS); } break; @@ -2949,14 +2949,14 @@ public final IdentifierOrParameterContext identifierOrParameter() throws Recogni IdentifierOrParameterContext _localctx = new IdentifierOrParameterContext(_ctx, getState()); enterRule(_localctx, 70, RULE_identifierOrParameter); try { - setState(473); + setState(475); _errHandler.sync(this); switch (_input.LA(1)) { case UNQUOTED_IDENTIFIER: case QUOTED_IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(470); + setState(472); identifier(); } break; @@ -2964,7 +2964,7 @@ public final IdentifierOrParameterContext identifierOrParameter() throws Recogni case NAMED_OR_POSITIONAL_PARAM: enterOuterAlt(_localctx, 2); { - setState(471); + setState(473); parameter(); } break; @@ -2972,7 +2972,7 @@ public final IdentifierOrParameterContext identifierOrParameter() throws Recogni case NAMED_OR_POSITIONAL_DOUBLE_PARAMS: enterOuterAlt(_localctx, 3); { - setState(472); + setState(474); doubleParameter(); } break; @@ -3023,13 +3023,13 @@ public final StringOrParameterContext stringOrParameter() throws RecognitionExce StringOrParameterContext _localctx = new StringOrParameterContext(_ctx, getState()); enterRule(_localctx, 72, RULE_stringOrParameter); try { - setState(477); + setState(479); _errHandler.sync(this); switch (_input.LA(1)) { case QUOTED_STRING: enterOuterAlt(_localctx, 1); { - setState(475); + setState(477); string(); } break; @@ -3037,7 +3037,7 @@ public final StringOrParameterContext stringOrParameter() throws RecognitionExce case NAMED_OR_POSITIONAL_PARAM: enterOuterAlt(_localctx, 2); { - setState(476); + setState(478); parameter(); } break; @@ -3062,6 +3062,9 @@ public static class LimitCommandContext extends ParserRuleContext { public ConstantContext constant() { return getRuleContext(ConstantContext.class,0); } + public LimitByGroupKeyContext limitByGroupKey() { + return getRuleContext(LimitByGroupKeyContext.class,0); + } @SuppressWarnings("this-escape") public LimitCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); @@ -3088,10 +3091,72 @@ public final LimitCommandContext limitCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(479); + setState(481); match(LIMIT); - setState(480); + setState(482); constant(); + setState(484); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) { + case 1: + { + setState(483); + limitByGroupKey(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LimitByGroupKeyContext extends ParserRuleContext { + public FieldsContext grouping; + public TerminalNode BY() { return getToken(EsqlBaseParser.BY, 0); } + public FieldsContext fields() { + return getRuleContext(FieldsContext.class,0); + } + @SuppressWarnings("this-escape") + public LimitByGroupKeyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_limitByGroupKey; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof EsqlBaseParserListener ) ((EsqlBaseParserListener)listener).enterLimitByGroupKey(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof EsqlBaseParserListener ) ((EsqlBaseParserListener)listener).exitLimitByGroupKey(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof EsqlBaseParserVisitor ) return ((EsqlBaseParserVisitor)visitor).visitLimitByGroupKey(this); + else return visitor.visitChildren(this); + } + } + + public final LimitByGroupKeyContext limitByGroupKey() throws RecognitionException { + LimitByGroupKeyContext _localctx = new LimitByGroupKeyContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_limitByGroupKey); + try { + enterOuterAlt(_localctx, 1); + { + setState(486); + if (!(this.isDevVersion())) throw new FailedPredicateException(this, "this.isDevVersion()"); + setState(487); + match(BY); + setState(488); + ((LimitByGroupKeyContext)_localctx).grouping = fields(); } } catch (RecognitionException re) { @@ -3140,32 +3205,32 @@ public T accept(ParseTreeVisitor visitor) { public final SortCommandContext sortCommand() throws RecognitionException { SortCommandContext _localctx = new SortCommandContext(_ctx, getState()); - enterRule(_localctx, 76, RULE_sortCommand); + enterRule(_localctx, 78, RULE_sortCommand); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(482); + setState(490); match(SORT); - setState(483); + setState(491); orderExpression(); - setState(488); + setState(496); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,30,_ctx); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(484); + setState(492); match(COMMA); - setState(485); + setState(493); orderExpression(); } } } - setState(490); + setState(498); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,30,_ctx); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); } } } @@ -3214,19 +3279,19 @@ public T accept(ParseTreeVisitor visitor) { public final OrderExpressionContext orderExpression() throws RecognitionException { OrderExpressionContext _localctx = new OrderExpressionContext(_ctx, getState()); - enterRule(_localctx, 78, RULE_orderExpression); + enterRule(_localctx, 80, RULE_orderExpression); int _la; try { enterOuterAlt(_localctx, 1); { - setState(491); + setState(499); booleanExpression(0); - setState(493); + setState(501); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,31,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) { case 1: { - setState(492); + setState(500); ((OrderExpressionContext)_localctx).ordering = _input.LT(1); _la = _input.LA(1); if ( !(_la==ASC || _la==DESC) ) { @@ -3240,14 +3305,14 @@ public final OrderExpressionContext orderExpression() throws RecognitionExceptio } break; } - setState(497); + setState(505); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { case 1: { - setState(495); + setState(503); match(NULLS); - setState(496); + setState(504); ((OrderExpressionContext)_localctx).nullOrdering = _input.LT(1); _la = _input.LA(1); if ( !(_la==FIRST || _la==LAST) ) { @@ -3302,13 +3367,13 @@ public T accept(ParseTreeVisitor visitor) { public final KeepCommandContext keepCommand() throws RecognitionException { KeepCommandContext _localctx = new KeepCommandContext(_ctx, getState()); - enterRule(_localctx, 80, RULE_keepCommand); + enterRule(_localctx, 82, RULE_keepCommand); try { enterOuterAlt(_localctx, 1); { - setState(499); + setState(507); match(KEEP); - setState(500); + setState(508); qualifiedNamePatterns(); } } @@ -3351,13 +3416,13 @@ public T accept(ParseTreeVisitor visitor) { public final DropCommandContext dropCommand() throws RecognitionException { DropCommandContext _localctx = new DropCommandContext(_ctx, getState()); - enterRule(_localctx, 82, RULE_dropCommand); + enterRule(_localctx, 84, RULE_dropCommand); try { enterOuterAlt(_localctx, 1); { - setState(502); + setState(510); match(DROP); - setState(503); + setState(511); qualifiedNamePatterns(); } } @@ -3407,32 +3472,32 @@ public T accept(ParseTreeVisitor visitor) { public final RenameCommandContext renameCommand() throws RecognitionException { RenameCommandContext _localctx = new RenameCommandContext(_ctx, getState()); - enterRule(_localctx, 84, RULE_renameCommand); + enterRule(_localctx, 86, RULE_renameCommand); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(505); + setState(513); match(RENAME); - setState(506); + setState(514); renameClause(); - setState(511); + setState(519); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,33,_ctx); + _alt = getInterpreter().adaptivePredict(_input,34,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(507); + setState(515); match(COMMA); - setState(508); + setState(516); renameClause(); } } } - setState(513); + setState(521); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,33,_ctx); + _alt = getInterpreter().adaptivePredict(_input,34,_ctx); } } } @@ -3481,30 +3546,30 @@ public T accept(ParseTreeVisitor visitor) { public final RenameClauseContext renameClause() throws RecognitionException { RenameClauseContext _localctx = new RenameClauseContext(_ctx, getState()); - enterRule(_localctx, 86, RULE_renameClause); + enterRule(_localctx, 88, RULE_renameClause); try { - setState(522); + setState(530); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(514); + setState(522); ((RenameClauseContext)_localctx).oldName = qualifiedNamePattern(); - setState(515); + setState(523); match(AS); - setState(516); + setState(524); ((RenameClauseContext)_localctx).newName = qualifiedNamePattern(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(518); + setState(526); ((RenameClauseContext)_localctx).newName = qualifiedNamePattern(); - setState(519); + setState(527); match(ASSIGN); - setState(520); + setState(528); ((RenameClauseContext)_localctx).oldName = qualifiedNamePattern(); } break; @@ -3555,22 +3620,22 @@ public T accept(ParseTreeVisitor visitor) { public final DissectCommandContext dissectCommand() throws RecognitionException { DissectCommandContext _localctx = new DissectCommandContext(_ctx, getState()); - enterRule(_localctx, 88, RULE_dissectCommand); + enterRule(_localctx, 90, RULE_dissectCommand); try { enterOuterAlt(_localctx, 1); { - setState(524); + setState(532); match(DISSECT); - setState(525); + setState(533); primaryExpression(0); - setState(526); + setState(534); string(); - setState(528); + setState(536); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { case 1: { - setState(527); + setState(535); dissectCommandOptions(); } break; @@ -3622,30 +3687,30 @@ public T accept(ParseTreeVisitor visitor) { public final DissectCommandOptionsContext dissectCommandOptions() throws RecognitionException { DissectCommandOptionsContext _localctx = new DissectCommandOptionsContext(_ctx, getState()); - enterRule(_localctx, 90, RULE_dissectCommandOptions); + enterRule(_localctx, 92, RULE_dissectCommandOptions); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(530); + setState(538); dissectCommandOption(); - setState(535); + setState(543); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,36,_ctx); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(531); + setState(539); match(COMMA); - setState(532); + setState(540); dissectCommandOption(); } } } - setState(537); + setState(545); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,36,_ctx); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); } } } @@ -3691,15 +3756,15 @@ public T accept(ParseTreeVisitor visitor) { public final DissectCommandOptionContext dissectCommandOption() throws RecognitionException { DissectCommandOptionContext _localctx = new DissectCommandOptionContext(_ctx, getState()); - enterRule(_localctx, 92, RULE_dissectCommandOption); + enterRule(_localctx, 94, RULE_dissectCommandOption); try { enterOuterAlt(_localctx, 1); { - setState(538); + setState(546); identifier(); - setState(539); + setState(547); match(ASSIGN); - setState(540); + setState(548); constant(); } } @@ -3742,18 +3807,18 @@ public T accept(ParseTreeVisitor visitor) { public final CommandNamedParametersContext commandNamedParameters() throws RecognitionException { CommandNamedParametersContext _localctx = new CommandNamedParametersContext(_ctx, getState()); - enterRule(_localctx, 94, RULE_commandNamedParameters); + enterRule(_localctx, 96, RULE_commandNamedParameters); try { enterOuterAlt(_localctx, 1); { - setState(544); + setState(552); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { case 1: { - setState(542); + setState(550); match(WITH); - setState(543); + setState(551); mapExpression(); } break; @@ -3809,34 +3874,34 @@ public T accept(ParseTreeVisitor visitor) { public final GrokCommandContext grokCommand() throws RecognitionException { GrokCommandContext _localctx = new GrokCommandContext(_ctx, getState()); - enterRule(_localctx, 96, RULE_grokCommand); + enterRule(_localctx, 98, RULE_grokCommand); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(546); + setState(554); match(GROK); - setState(547); + setState(555); primaryExpression(0); - setState(548); + setState(556); string(); - setState(553); + setState(561); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,38,_ctx); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(549); + setState(557); match(COMMA); - setState(550); + setState(558); string(); } } } - setState(555); + setState(563); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,38,_ctx); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); } } } @@ -3879,13 +3944,13 @@ public T accept(ParseTreeVisitor visitor) { public final MvExpandCommandContext mvExpandCommand() throws RecognitionException { MvExpandCommandContext _localctx = new MvExpandCommandContext(_ctx, getState()); - enterRule(_localctx, 98, RULE_mvExpandCommand); + enterRule(_localctx, 100, RULE_mvExpandCommand); try { enterOuterAlt(_localctx, 1); { - setState(556); + setState(564); match(MV_EXPAND); - setState(557); + setState(565); qualifiedName(); } } @@ -3928,13 +3993,13 @@ public T accept(ParseTreeVisitor visitor) { public final ExplainCommandContext explainCommand() throws RecognitionException { ExplainCommandContext _localctx = new ExplainCommandContext(_ctx, getState()); - enterRule(_localctx, 100, RULE_explainCommand); + enterRule(_localctx, 102, RULE_explainCommand); try { enterOuterAlt(_localctx, 1); { - setState(559); + setState(567); match(DEV_EXPLAIN); - setState(560); + setState(568); subqueryExpression(); } } @@ -3978,15 +4043,15 @@ public T accept(ParseTreeVisitor visitor) { public final SubqueryExpressionContext subqueryExpression() throws RecognitionException { SubqueryExpressionContext _localctx = new SubqueryExpressionContext(_ctx, getState()); - enterRule(_localctx, 102, RULE_subqueryExpression); + enterRule(_localctx, 104, RULE_subqueryExpression); try { enterOuterAlt(_localctx, 1); { - setState(562); + setState(570); match(LP); - setState(563); + setState(571); query(0); - setState(564); + setState(572); match(RP); } } @@ -4038,14 +4103,14 @@ public T accept(ParseTreeVisitor visitor) { public final ShowCommandContext showCommand() throws RecognitionException { ShowCommandContext _localctx = new ShowCommandContext(_ctx, getState()); - enterRule(_localctx, 104, RULE_showCommand); + enterRule(_localctx, 106, RULE_showCommand); try { _localctx = new ShowInfoContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(566); + setState(574); match(SHOW); - setState(567); + setState(575); match(INFO); } } @@ -4105,53 +4170,53 @@ public T accept(ParseTreeVisitor visitor) { public final EnrichCommandContext enrichCommand() throws RecognitionException { EnrichCommandContext _localctx = new EnrichCommandContext(_ctx, getState()); - enterRule(_localctx, 106, RULE_enrichCommand); + enterRule(_localctx, 108, RULE_enrichCommand); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(569); + setState(577); match(ENRICH); - setState(570); + setState(578); ((EnrichCommandContext)_localctx).policyName = enrichPolicyName(); - setState(573); + setState(581); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) { case 1: { - setState(571); + setState(579); match(ON); - setState(572); + setState(580); ((EnrichCommandContext)_localctx).matchField = qualifiedNamePattern(); } break; } - setState(584); + setState(592); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,41,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) { case 1: { - setState(575); + setState(583); match(WITH); - setState(576); + setState(584); enrichWithClause(); - setState(581); + setState(589); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,40,_ctx); + _alt = getInterpreter().adaptivePredict(_input,41,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(577); + setState(585); match(COMMA); - setState(578); + setState(586); enrichWithClause(); } } } - setState(583); + setState(591); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,40,_ctx); + _alt = getInterpreter().adaptivePredict(_input,41,_ctx); } } break; @@ -4195,12 +4260,12 @@ public T accept(ParseTreeVisitor visitor) { public final EnrichPolicyNameContext enrichPolicyName() throws RecognitionException { EnrichPolicyNameContext _localctx = new EnrichPolicyNameContext(_ctx, getState()); - enterRule(_localctx, 108, RULE_enrichPolicyName); + enterRule(_localctx, 110, RULE_enrichPolicyName); int _la; try { enterOuterAlt(_localctx, 1); { - setState(586); + setState(594); _la = _input.LA(1); if ( !(_la==ENRICH_POLICY_NAME || _la==QUOTED_STRING) ) { _errHandler.recoverInline(this); @@ -4256,23 +4321,23 @@ public T accept(ParseTreeVisitor visitor) { public final EnrichWithClauseContext enrichWithClause() throws RecognitionException { EnrichWithClauseContext _localctx = new EnrichWithClauseContext(_ctx, getState()); - enterRule(_localctx, 110, RULE_enrichWithClause); + enterRule(_localctx, 112, RULE_enrichWithClause); try { enterOuterAlt(_localctx, 1); { - setState(591); + setState(599); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) { case 1: { - setState(588); + setState(596); ((EnrichWithClauseContext)_localctx).newName = qualifiedNamePattern(); - setState(589); + setState(597); match(ASSIGN); } break; } - setState(593); + setState(601); ((EnrichWithClauseContext)_localctx).enrichField = qualifiedNamePattern(); } } @@ -4316,13 +4381,13 @@ public T accept(ParseTreeVisitor visitor) { public final SampleCommandContext sampleCommand() throws RecognitionException { SampleCommandContext _localctx = new SampleCommandContext(_ctx, getState()); - enterRule(_localctx, 112, RULE_sampleCommand); + enterRule(_localctx, 114, RULE_sampleCommand); try { enterOuterAlt(_localctx, 1); { - setState(595); + setState(603); match(SAMPLE); - setState(596); + setState(604); ((SampleCommandContext)_localctx).probability = constant(); } } @@ -4375,38 +4440,38 @@ public T accept(ParseTreeVisitor visitor) { public final ChangePointCommandContext changePointCommand() throws RecognitionException { ChangePointCommandContext _localctx = new ChangePointCommandContext(_ctx, getState()); - enterRule(_localctx, 114, RULE_changePointCommand); + enterRule(_localctx, 116, RULE_changePointCommand); try { enterOuterAlt(_localctx, 1); { - setState(598); + setState(606); match(CHANGE_POINT); - setState(599); + setState(607); ((ChangePointCommandContext)_localctx).value = qualifiedName(); - setState(602); + setState(610); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) { case 1: { - setState(600); + setState(608); match(ON); - setState(601); + setState(609); ((ChangePointCommandContext)_localctx).key = qualifiedName(); } break; } - setState(609); + setState(617); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { case 1: { - setState(604); + setState(612); match(AS); - setState(605); + setState(613); ((ChangePointCommandContext)_localctx).targetType = qualifiedName(); - setState(606); + setState(614); match(COMMA); - setState(607); + setState(615); ((ChangePointCommandContext)_localctx).targetPvalue = qualifiedName(); } break; @@ -4452,13 +4517,13 @@ public T accept(ParseTreeVisitor visitor) { public final ForkCommandContext forkCommand() throws RecognitionException { ForkCommandContext _localctx = new ForkCommandContext(_ctx, getState()); - enterRule(_localctx, 116, RULE_forkCommand); + enterRule(_localctx, 118, RULE_forkCommand); try { enterOuterAlt(_localctx, 1); { - setState(611); + setState(619); match(FORK); - setState(612); + setState(620); forkSubQueries(); } } @@ -4503,12 +4568,12 @@ public T accept(ParseTreeVisitor visitor) { public final ForkSubQueriesContext forkSubQueries() throws RecognitionException { ForkSubQueriesContext _localctx = new ForkSubQueriesContext(_ctx, getState()); - enterRule(_localctx, 118, RULE_forkSubQueries); + enterRule(_localctx, 120, RULE_forkSubQueries); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(615); + setState(623); _errHandler.sync(this); _alt = 1; do { @@ -4516,7 +4581,7 @@ public final ForkSubQueriesContext forkSubQueries() throws RecognitionException case 1: { { - setState(614); + setState(622); forkSubQuery(); } } @@ -4524,9 +4589,9 @@ public final ForkSubQueriesContext forkSubQueries() throws RecognitionException default: throw new NoViableAltException(this); } - setState(617); + setState(625); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,45,_ctx); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } } @@ -4570,15 +4635,15 @@ public T accept(ParseTreeVisitor visitor) { public final ForkSubQueryContext forkSubQuery() throws RecognitionException { ForkSubQueryContext _localctx = new ForkSubQueryContext(_ctx, getState()); - enterRule(_localctx, 120, RULE_forkSubQuery); + enterRule(_localctx, 122, RULE_forkSubQuery); try { enterOuterAlt(_localctx, 1); { - setState(619); + setState(627); match(LP); - setState(620); + setState(628); forkSubQueryCommand(0); - setState(621); + setState(629); match(RP); } } @@ -4663,8 +4728,8 @@ private ForkSubQueryCommandContext forkSubQueryCommand(int _p) throws Recognitio int _parentState = getState(); ForkSubQueryCommandContext _localctx = new ForkSubQueryCommandContext(_ctx, _parentState); ForkSubQueryCommandContext _prevctx = _localctx; - int _startState = 122; - enterRecursionRule(_localctx, 122, RULE_forkSubQueryCommand, _p); + int _startState = 124; + enterRecursionRule(_localctx, 124, RULE_forkSubQueryCommand, _p); try { int _alt; enterOuterAlt(_localctx, 1); @@ -4674,13 +4739,13 @@ private ForkSubQueryCommandContext forkSubQueryCommand(int _p) throws Recognitio _ctx = _localctx; _prevctx = _localctx; - setState(624); + setState(632); forkSubQueryProcessingCommand(); } _ctx.stop = _input.LT(-1); - setState(631); + setState(639); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + _alt = getInterpreter().adaptivePredict(_input,47,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); @@ -4689,18 +4754,18 @@ private ForkSubQueryCommandContext forkSubQueryCommand(int _p) throws Recognitio { _localctx = new CompositeForkSubQueryContext(new ForkSubQueryCommandContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_forkSubQueryCommand); - setState(626); + setState(634); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(627); + setState(635); match(PIPE); - setState(628); + setState(636); forkSubQueryProcessingCommand(); } } } - setState(633); + setState(641); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + _alt = getInterpreter().adaptivePredict(_input,47,_ctx); } } } @@ -4742,11 +4807,11 @@ public T accept(ParseTreeVisitor visitor) { public final ForkSubQueryProcessingCommandContext forkSubQueryProcessingCommand() throws RecognitionException { ForkSubQueryProcessingCommandContext _localctx = new ForkSubQueryProcessingCommandContext(_ctx, getState()); - enterRule(_localctx, 124, RULE_forkSubQueryProcessingCommand); + enterRule(_localctx, 126, RULE_forkSubQueryProcessingCommand); try { enterOuterAlt(_localctx, 1); { - setState(634); + setState(642); processingCommand(); } } @@ -4803,31 +4868,31 @@ public T accept(ParseTreeVisitor visitor) { public final RerankCommandContext rerankCommand() throws RecognitionException { RerankCommandContext _localctx = new RerankCommandContext(_ctx, getState()); - enterRule(_localctx, 126, RULE_rerankCommand); + enterRule(_localctx, 128, RULE_rerankCommand); try { enterOuterAlt(_localctx, 1); { - setState(636); + setState(644); match(RERANK); - setState(640); + setState(648); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,48,_ctx) ) { case 1: { - setState(637); + setState(645); ((RerankCommandContext)_localctx).targetField = qualifiedName(); - setState(638); + setState(646); match(ASSIGN); } break; } - setState(642); + setState(650); ((RerankCommandContext)_localctx).queryText = constant(); - setState(643); + setState(651); match(ON); - setState(644); + setState(652); ((RerankCommandContext)_localctx).rerankFields = fields(); - setState(645); + setState(653); commandNamedParameters(); } } @@ -4879,27 +4944,27 @@ public T accept(ParseTreeVisitor visitor) { public final CompletionCommandContext completionCommand() throws RecognitionException { CompletionCommandContext _localctx = new CompletionCommandContext(_ctx, getState()); - enterRule(_localctx, 128, RULE_completionCommand); + enterRule(_localctx, 130, RULE_completionCommand); try { enterOuterAlt(_localctx, 1); { - setState(647); + setState(655); match(COMPLETION); - setState(651); + setState(659); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,48,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,49,_ctx) ) { case 1: { - setState(648); + setState(656); ((CompletionCommandContext)_localctx).targetField = qualifiedName(); - setState(649); + setState(657); match(ASSIGN); } break; } - setState(653); + setState(661); ((CompletionCommandContext)_localctx).prompt = primaryExpression(0); - setState(654); + setState(662); commandNamedParameters(); } } @@ -4950,28 +5015,28 @@ public T accept(ParseTreeVisitor visitor) { public final InlineStatsCommandContext inlineStatsCommand() throws RecognitionException { InlineStatsCommandContext _localctx = new InlineStatsCommandContext(_ctx, getState()); - enterRule(_localctx, 130, RULE_inlineStatsCommand); + enterRule(_localctx, 132, RULE_inlineStatsCommand); try { - setState(669); + setState(677); _errHandler.sync(this); switch (_input.LA(1)) { case INLINE: enterOuterAlt(_localctx, 1); { - setState(656); + setState(664); match(INLINE); - setState(657); + setState(665); match(INLINE_STATS); - setState(658); + setState(666); ((InlineStatsCommandContext)_localctx).stats = aggFields(); - setState(661); + setState(669); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,49,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) { case 1: { - setState(659); + setState(667); match(BY); - setState(660); + setState(668); ((InlineStatsCommandContext)_localctx).grouping = fields(); } break; @@ -4981,18 +5046,18 @@ public final InlineStatsCommandContext inlineStatsCommand() throws RecognitionEx case INLINESTATS: enterOuterAlt(_localctx, 2); { - setState(663); + setState(671); match(INLINESTATS); - setState(664); + setState(672); ((InlineStatsCommandContext)_localctx).stats = aggFields(); - setState(667); + setState(675); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) { case 1: { - setState(665); + setState(673); match(BY); - setState(666); + setState(674); ((InlineStatsCommandContext)_localctx).grouping = fields(); } break; @@ -5049,38 +5114,38 @@ public T accept(ParseTreeVisitor visitor) { public final FuseCommandContext fuseCommand() throws RecognitionException { FuseCommandContext _localctx = new FuseCommandContext(_ctx, getState()); - enterRule(_localctx, 132, RULE_fuseCommand); + enterRule(_localctx, 134, RULE_fuseCommand); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(671); + setState(679); match(FUSE); - setState(673); + setState(681); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,52,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,53,_ctx) ) { case 1: { - setState(672); + setState(680); ((FuseCommandContext)_localctx).fuseType = identifier(); } break; } - setState(678); + setState(686); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,53,_ctx); + _alt = getInterpreter().adaptivePredict(_input,54,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(675); + setState(683); fuseConfiguration(); } } } - setState(680); + setState(688); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,53,_ctx); + _alt = getInterpreter().adaptivePredict(_input,54,_ctx); } } } @@ -5137,50 +5202,50 @@ public T accept(ParseTreeVisitor visitor) { public final FuseConfigurationContext fuseConfiguration() throws RecognitionException { FuseConfigurationContext _localctx = new FuseConfigurationContext(_ctx, getState()); - enterRule(_localctx, 134, RULE_fuseConfiguration); + enterRule(_localctx, 136, RULE_fuseConfiguration); try { - setState(692); + setState(700); _errHandler.sync(this); switch (_input.LA(1)) { case SCORE: enterOuterAlt(_localctx, 1); { - setState(681); + setState(689); match(SCORE); - setState(682); + setState(690); match(BY); - setState(683); + setState(691); ((FuseConfigurationContext)_localctx).score = qualifiedName(); } break; case KEY: enterOuterAlt(_localctx, 2); { - setState(684); + setState(692); match(KEY); - setState(685); + setState(693); match(BY); - setState(686); + setState(694); ((FuseConfigurationContext)_localctx).key = fuseKeyByFields(); } break; case GROUP: enterOuterAlt(_localctx, 3); { - setState(687); + setState(695); match(GROUP); - setState(688); + setState(696); match(BY); - setState(689); + setState(697); ((FuseConfigurationContext)_localctx).group = qualifiedName(); } break; case WITH: enterOuterAlt(_localctx, 4); { - setState(690); + setState(698); match(WITH); - setState(691); + setState(699); ((FuseConfigurationContext)_localctx).options = mapExpression(); } break; @@ -5233,30 +5298,30 @@ public T accept(ParseTreeVisitor visitor) { public final FuseKeyByFieldsContext fuseKeyByFields() throws RecognitionException { FuseKeyByFieldsContext _localctx = new FuseKeyByFieldsContext(_ctx, getState()); - enterRule(_localctx, 136, RULE_fuseKeyByFields); + enterRule(_localctx, 138, RULE_fuseKeyByFields); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(694); + setState(702); qualifiedName(); - setState(699); + setState(707); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + _alt = getInterpreter().adaptivePredict(_input,56,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(695); + setState(703); match(COMMA); - setState(696); + setState(704); qualifiedName(); } } } - setState(701); + setState(709); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + _alt = getInterpreter().adaptivePredict(_input,56,_ctx); } } } @@ -5296,11 +5361,11 @@ public T accept(ParseTreeVisitor visitor) { public final MetricsInfoCommandContext metricsInfoCommand() throws RecognitionException { MetricsInfoCommandContext _localctx = new MetricsInfoCommandContext(_ctx, getState()); - enterRule(_localctx, 138, RULE_metricsInfoCommand); + enterRule(_localctx, 140, RULE_metricsInfoCommand); try { enterOuterAlt(_localctx, 1); { - setState(702); + setState(710); match(METRICS_INFO); } } @@ -5340,11 +5405,11 @@ public T accept(ParseTreeVisitor visitor) { public final TsInfoCommandContext tsInfoCommand() throws RecognitionException { TsInfoCommandContext _localctx = new TsInfoCommandContext(_ctx, getState()); - enterRule(_localctx, 140, RULE_tsInfoCommand); + enterRule(_localctx, 142, RULE_tsInfoCommand); try { enterOuterAlt(_localctx, 1); { - setState(704); + setState(712); match(TS_INFO); } } @@ -5393,17 +5458,17 @@ public T accept(ParseTreeVisitor visitor) { public final LookupCommandContext lookupCommand() throws RecognitionException { LookupCommandContext _localctx = new LookupCommandContext(_ctx, getState()); - enterRule(_localctx, 142, RULE_lookupCommand); + enterRule(_localctx, 144, RULE_lookupCommand); try { enterOuterAlt(_localctx, 1); { - setState(706); + setState(714); match(DEV_LOOKUP); - setState(707); + setState(715); ((LookupCommandContext)_localctx).tableName = indexPattern(); - setState(708); + setState(716); match(ON); - setState(709); + setState(717); ((LookupCommandContext)_localctx).matchFields = qualifiedNamePatterns(); } } @@ -5446,13 +5511,13 @@ public T accept(ParseTreeVisitor visitor) { public final InsistCommandContext insistCommand() throws RecognitionException { InsistCommandContext _localctx = new InsistCommandContext(_ctx, getState()); - enterRule(_localctx, 144, RULE_insistCommand); + enterRule(_localctx, 146, RULE_insistCommand); try { enterOuterAlt(_localctx, 1); { - setState(711); + setState(719); match(DEV_INSIST); - setState(712); + setState(720); qualifiedNamePatterns(); } } @@ -5499,17 +5564,17 @@ public T accept(ParseTreeVisitor visitor) { public final UriPartsCommandContext uriPartsCommand() throws RecognitionException { UriPartsCommandContext _localctx = new UriPartsCommandContext(_ctx, getState()); - enterRule(_localctx, 146, RULE_uriPartsCommand); + enterRule(_localctx, 148, RULE_uriPartsCommand); try { enterOuterAlt(_localctx, 1); { - setState(714); + setState(722); match(URI_PARTS); - setState(715); + setState(723); qualifiedName(); - setState(716); + setState(724); match(ASSIGN); - setState(717); + setState(725); primaryExpression(0); } } @@ -5556,17 +5621,17 @@ public T accept(ParseTreeVisitor visitor) { public final RegisteredDomainCommandContext registeredDomainCommand() throws RecognitionException { RegisteredDomainCommandContext _localctx = new RegisteredDomainCommandContext(_ctx, getState()); - enterRule(_localctx, 148, RULE_registeredDomainCommand); + enterRule(_localctx, 150, RULE_registeredDomainCommand); try { enterOuterAlt(_localctx, 1); { - setState(719); + setState(727); match(REGISTERED_DOMAIN); - setState(720); + setState(728); qualifiedName(); - setState(721); + setState(729); match(ASSIGN); - setState(722); + setState(730); primaryExpression(0); } } @@ -5610,15 +5675,15 @@ public T accept(ParseTreeVisitor visitor) { public final SetCommandContext setCommand() throws RecognitionException { SetCommandContext _localctx = new SetCommandContext(_ctx, getState()); - enterRule(_localctx, 150, RULE_setCommand); + enterRule(_localctx, 152, RULE_setCommand); try { enterOuterAlt(_localctx, 1); { - setState(724); + setState(732); match(SET); - setState(725); + setState(733); setField(); - setState(726); + setState(734); match(SEMICOLON); } } @@ -5667,15 +5732,15 @@ public T accept(ParseTreeVisitor visitor) { public final SetFieldContext setField() throws RecognitionException { SetFieldContext _localctx = new SetFieldContext(_ctx, getState()); - enterRule(_localctx, 152, RULE_setField); + enterRule(_localctx, 154, RULE_setField); try { enterOuterAlt(_localctx, 1); { - setState(728); + setState(736); identifier(); - setState(729); + setState(737); match(ASSIGN); - setState(732); + setState(740); _errHandler.sync(this); switch (_input.LA(1)) { case QUOTED_STRING: @@ -5690,13 +5755,13 @@ public final SetFieldContext setField() throws RecognitionException { case NAMED_OR_POSITIONAL_PARAM: case OPENING_BRACKET: { - setState(730); + setState(738); constant(); } break; case LEFT_BRACES: { - setState(731); + setState(739); mapExpression(); } break; @@ -5758,31 +5823,31 @@ public T accept(ParseTreeVisitor visitor) { public final MmrCommandContext mmrCommand() throws RecognitionException { MmrCommandContext _localctx = new MmrCommandContext(_ctx, getState()); - enterRule(_localctx, 154, RULE_mmrCommand); + enterRule(_localctx, 156, RULE_mmrCommand); try { enterOuterAlt(_localctx, 1); { - setState(734); + setState(742); match(MMR); - setState(736); + setState(744); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,57,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,58,_ctx) ) { case 1: { - setState(735); + setState(743); ((MmrCommandContext)_localctx).queryVector = mmrQueryVectorParams(); } break; } - setState(738); + setState(746); match(ON); - setState(739); + setState(747); ((MmrCommandContext)_localctx).diversifyField = qualifiedName(); - setState(740); + setState(748); match(MMR_LIMIT); - setState(741); + setState(749); ((MmrCommandContext)_localctx).limitValue = integerValue(); - setState(742); + setState(750); commandNamedParameters(); } } @@ -5856,16 +5921,16 @@ public T accept(ParseTreeVisitor visitor) { public final MmrQueryVectorParamsContext mmrQueryVectorParams() throws RecognitionException { MmrQueryVectorParamsContext _localctx = new MmrQueryVectorParamsContext(_ctx, getState()); - enterRule(_localctx, 156, RULE_mmrQueryVectorParams); + enterRule(_localctx, 158, RULE_mmrQueryVectorParams); try { - setState(746); + setState(754); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,58,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) { case 1: _localctx = new MmrQueryVectorParameterContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(744); + setState(752); parameter(); } break; @@ -5873,7 +5938,7 @@ public final MmrQueryVectorParamsContext mmrQueryVectorParams() throws Recogniti _localctx = new MmrQueryVectorExpressionContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(745); + setState(753); primaryExpression(0); } break; @@ -6084,25 +6149,25 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc int _parentState = getState(); BooleanExpressionContext _localctx = new BooleanExpressionContext(_ctx, _parentState); BooleanExpressionContext _prevctx = _localctx; - int _startState = 158; - enterRecursionRule(_localctx, 158, RULE_booleanExpression, _p); + int _startState = 160; + enterRecursionRule(_localctx, 160, RULE_booleanExpression, _p); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(777); + setState(785); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) { case 1: { _localctx = new LogicalNotContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(749); + setState(757); match(NOT); - setState(750); + setState(758); booleanExpression(8); } break; @@ -6111,7 +6176,7 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new BooleanDefaultContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(751); + setState(759); valueExpression(); } break; @@ -6120,7 +6185,7 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new RegexExpressionContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(752); + setState(760); regexBooleanExpression(); } break; @@ -6129,41 +6194,41 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new LogicalInContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(753); + setState(761); valueExpression(); - setState(755); + setState(763); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(754); + setState(762); match(NOT); } } - setState(757); + setState(765); match(IN); - setState(758); + setState(766); match(LP); - setState(759); + setState(767); valueExpression(); - setState(764); + setState(772); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(760); + setState(768); match(COMMA); - setState(761); + setState(769); valueExpression(); } } - setState(766); + setState(774); _errHandler.sync(this); _la = _input.LA(1); } - setState(767); + setState(775); match(RP); } break; @@ -6172,21 +6237,21 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new IsNullContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(769); + setState(777); valueExpression(); - setState(770); + setState(778); match(IS); - setState(772); + setState(780); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(771); + setState(779); match(NOT); } } - setState(774); + setState(782); match(NULL); } break; @@ -6195,33 +6260,33 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new MatchExpressionContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(776); + setState(784); matchBooleanExpression(); } break; } _ctx.stop = _input.LT(-1); - setState(787); + setState(795); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,64,_ctx); + _alt = getInterpreter().adaptivePredict(_input,65,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(785); + setState(793); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,64,_ctx) ) { case 1: { _localctx = new LogicalBinaryContext(new BooleanExpressionContext(_parentctx, _parentState)); ((LogicalBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression); - setState(779); + setState(787); if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); - setState(780); + setState(788); ((LogicalBinaryContext)_localctx).operator = match(AND); - setState(781); + setState(789); ((LogicalBinaryContext)_localctx).right = booleanExpression(6); } break; @@ -6230,20 +6295,20 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new LogicalBinaryContext(new BooleanExpressionContext(_parentctx, _parentState)); ((LogicalBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression); - setState(782); + setState(790); if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); - setState(783); + setState(791); ((LogicalBinaryContext)_localctx).operator = match(OR); - setState(784); + setState(792); ((LogicalBinaryContext)_localctx).right = booleanExpression(5); } break; } } } - setState(789); + setState(797); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,64,_ctx); + _alt = getInterpreter().adaptivePredict(_input,65,_ctx); } } } @@ -6397,31 +6462,31 @@ public T accept(ParseTreeVisitor visitor) { public final RegexBooleanExpressionContext regexBooleanExpression() throws RecognitionException { RegexBooleanExpressionContext _localctx = new RegexBooleanExpressionContext(_ctx, getState()); - enterRule(_localctx, 160, RULE_regexBooleanExpression); + enterRule(_localctx, 162, RULE_regexBooleanExpression); int _la; try { - setState(836); + setState(844); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,72,_ctx) ) { case 1: _localctx = new LikeExpressionContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(790); + setState(798); valueExpression(); - setState(792); + setState(800); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(791); + setState(799); match(NOT); } } - setState(794); + setState(802); match(LIKE); - setState(795); + setState(803); stringOrParameter(); } break; @@ -6429,21 +6494,21 @@ public final RegexBooleanExpressionContext regexBooleanExpression() throws Recog _localctx = new RlikeExpressionContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(797); + setState(805); valueExpression(); - setState(799); + setState(807); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(798); + setState(806); match(NOT); } } - setState(801); + setState(809); match(RLIKE); - setState(802); + setState(810); stringOrParameter(); } break; @@ -6451,41 +6516,41 @@ public final RegexBooleanExpressionContext regexBooleanExpression() throws Recog _localctx = new LikeListExpressionContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(804); + setState(812); valueExpression(); - setState(806); + setState(814); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(805); + setState(813); match(NOT); } } - setState(808); + setState(816); match(LIKE); - setState(809); + setState(817); match(LP); - setState(810); + setState(818); stringOrParameter(); - setState(815); + setState(823); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(811); + setState(819); match(COMMA); - setState(812); + setState(820); stringOrParameter(); } } - setState(817); + setState(825); _errHandler.sync(this); _la = _input.LA(1); } - setState(818); + setState(826); match(RP); } break; @@ -6493,41 +6558,41 @@ public final RegexBooleanExpressionContext regexBooleanExpression() throws Recog _localctx = new RlikeListExpressionContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(820); + setState(828); valueExpression(); - setState(822); + setState(830); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(821); + setState(829); match(NOT); } } - setState(824); + setState(832); match(RLIKE); - setState(825); + setState(833); match(LP); - setState(826); + setState(834); stringOrParameter(); - setState(831); + setState(839); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(827); + setState(835); match(COMMA); - setState(828); + setState(836); stringOrParameter(); } } - setState(833); + setState(841); _errHandler.sync(this); _la = _input.LA(1); } - setState(834); + setState(842); match(RP); } break; @@ -6582,28 +6647,28 @@ public T accept(ParseTreeVisitor visitor) { public final MatchBooleanExpressionContext matchBooleanExpression() throws RecognitionException { MatchBooleanExpressionContext _localctx = new MatchBooleanExpressionContext(_ctx, getState()); - enterRule(_localctx, 162, RULE_matchBooleanExpression); + enterRule(_localctx, 164, RULE_matchBooleanExpression); int _la; try { enterOuterAlt(_localctx, 1); { - setState(838); + setState(846); ((MatchBooleanExpressionContext)_localctx).fieldExp = qualifiedName(); - setState(841); + setState(849); _errHandler.sync(this); _la = _input.LA(1); if (_la==CAST_OP) { { - setState(839); + setState(847); match(CAST_OP); - setState(840); + setState(848); ((MatchBooleanExpressionContext)_localctx).fieldType = dataType(); } } - setState(843); + setState(851); match(COLON); - setState(844); + setState(852); ((MatchBooleanExpressionContext)_localctx).matchQuery = constant(); } } @@ -6685,16 +6750,16 @@ public T accept(ParseTreeVisitor visitor) { public final ValueExpressionContext valueExpression() throws RecognitionException { ValueExpressionContext _localctx = new ValueExpressionContext(_ctx, getState()); - enterRule(_localctx, 164, RULE_valueExpression); + enterRule(_localctx, 166, RULE_valueExpression); try { - setState(851); + setState(859); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,73,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,74,_ctx) ) { case 1: _localctx = new ValueExpressionDefaultContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(846); + setState(854); operatorExpression(0); } break; @@ -6702,11 +6767,11 @@ public final ValueExpressionContext valueExpression() throws RecognitionExceptio _localctx = new ComparisonContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(847); + setState(855); ((ComparisonContext)_localctx).left = operatorExpression(0); - setState(848); + setState(856); comparisonOperator(); - setState(849); + setState(857); ((ComparisonContext)_localctx).right = operatorExpression(0); } break; @@ -6824,23 +6889,23 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE int _parentState = getState(); OperatorExpressionContext _localctx = new OperatorExpressionContext(_ctx, _parentState); OperatorExpressionContext _prevctx = _localctx; - int _startState = 166; - enterRecursionRule(_localctx, 166, RULE_operatorExpression, _p); + int _startState = 168; + enterRecursionRule(_localctx, 168, RULE_operatorExpression, _p); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(857); + setState(865); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,74,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { case 1: { _localctx = new OperatorExpressionDefaultContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(854); + setState(862); primaryExpression(0); } break; @@ -6849,7 +6914,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _localctx = new ArithmeticUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(855); + setState(863); ((ArithmeticUnaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { @@ -6860,31 +6925,31 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _errHandler.reportMatch(this); consume(); } - setState(856); + setState(864); operatorExpression(3); } break; } _ctx.stop = _input.LT(-1); - setState(867); + setState(875); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,76,_ctx); + _alt = getInterpreter().adaptivePredict(_input,77,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(865); + setState(873); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,76,_ctx) ) { case 1: { _localctx = new ArithmeticBinaryContext(new OperatorExpressionContext(_parentctx, _parentState)); ((ArithmeticBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_operatorExpression); - setState(859); + setState(867); if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(860); + setState(868); ((ArithmeticBinaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(((((_la - 95)) & ~0x3f) == 0 && ((1L << (_la - 95)) & 7L) != 0)) ) { @@ -6895,7 +6960,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _errHandler.reportMatch(this); consume(); } - setState(861); + setState(869); ((ArithmeticBinaryContext)_localctx).right = operatorExpression(3); } break; @@ -6904,9 +6969,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(862); + setState(870); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(863); + setState(871); ((ArithmeticBinaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { @@ -6917,16 +6982,16 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _errHandler.reportMatch(this); consume(); } - setState(864); + setState(872); ((ArithmeticBinaryContext)_localctx).right = operatorExpression(2); } break; } } } - setState(869); + setState(877); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,76,_ctx); + _alt = getInterpreter().adaptivePredict(_input,77,_ctx); } } } @@ -7076,22 +7141,22 @@ private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionExc int _parentState = getState(); PrimaryExpressionContext _localctx = new PrimaryExpressionContext(_ctx, _parentState); PrimaryExpressionContext _prevctx = _localctx; - int _startState = 168; - enterRecursionRule(_localctx, 168, RULE_primaryExpression, _p); + int _startState = 170; + enterRecursionRule(_localctx, 170, RULE_primaryExpression, _p); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(878); + setState(886); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,77,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,78,_ctx) ) { case 1: { _localctx = new ConstantDefaultContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(871); + setState(879); constant(); } break; @@ -7100,7 +7165,7 @@ private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionExc _localctx = new DereferenceContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(872); + setState(880); qualifiedName(); } break; @@ -7109,7 +7174,7 @@ private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionExc _localctx = new FunctionContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(873); + setState(881); functionExpression(); } break; @@ -7118,19 +7183,19 @@ private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionExc _localctx = new ParenthesizedExpressionContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(874); + setState(882); match(LP); - setState(875); + setState(883); booleanExpression(0); - setState(876); + setState(884); match(RP); } break; } _ctx.stop = _input.LT(-1); - setState(885); + setState(893); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,78,_ctx); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); @@ -7139,18 +7204,18 @@ private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionExc { _localctx = new InlineCastContext(new PrimaryExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_primaryExpression); - setState(880); + setState(888); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(881); + setState(889); match(CAST_OP); - setState(882); + setState(890); dataType(); } } } - setState(887); + setState(895); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,78,_ctx); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); } } } @@ -7208,56 +7273,56 @@ public T accept(ParseTreeVisitor visitor) { public final FunctionExpressionContext functionExpression() throws RecognitionException { FunctionExpressionContext _localctx = new FunctionExpressionContext(_ctx, getState()); - enterRule(_localctx, 170, RULE_functionExpression); + enterRule(_localctx, 172, RULE_functionExpression); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(888); + setState(896); functionName(); - setState(889); + setState(897); match(LP); - setState(903); + setState(911); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,82,_ctx) ) { case 1: { - setState(890); + setState(898); match(ASTERISK); } break; case 2: { { - setState(891); + setState(899); booleanExpression(0); - setState(896); + setState(904); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(892); + setState(900); match(COMMA); - setState(893); + setState(901); booleanExpression(0); } } } - setState(898); + setState(906); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); } - setState(901); + setState(909); _errHandler.sync(this); _la = _input.LA(1); if (_la==COMMA) { { - setState(899); + setState(907); match(COMMA); - setState(900); + setState(908); mapExpression(); } } @@ -7266,7 +7331,7 @@ public final FunctionExpressionContext functionExpression() throws RecognitionEx } break; } - setState(905); + setState(913); match(RP); } } @@ -7310,9 +7375,9 @@ public T accept(ParseTreeVisitor visitor) { public final FunctionNameContext functionName() throws RecognitionException { FunctionNameContext _localctx = new FunctionNameContext(_ctx, getState()); - enterRule(_localctx, 172, RULE_functionName); + enterRule(_localctx, 174, RULE_functionName); try { - setState(910); + setState(918); _errHandler.sync(this); switch (_input.LA(1)) { case PARAM: @@ -7323,21 +7388,21 @@ public final FunctionNameContext functionName() throws RecognitionException { case QUOTED_IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(907); + setState(915); identifierOrParameter(); } break; case FIRST: enterOuterAlt(_localctx, 2); { - setState(908); + setState(916); match(FIRST); } break; case LAST: enterOuterAlt(_localctx, 3); { - setState(909); + setState(917); match(LAST); } break; @@ -7392,40 +7457,40 @@ public T accept(ParseTreeVisitor visitor) { public final MapExpressionContext mapExpression() throws RecognitionException { MapExpressionContext _localctx = new MapExpressionContext(_ctx, getState()); - enterRule(_localctx, 174, RULE_mapExpression); + enterRule(_localctx, 176, RULE_mapExpression); int _la; try { enterOuterAlt(_localctx, 1); { - setState(912); + setState(920); match(LEFT_BRACES); - setState(921); + setState(929); _errHandler.sync(this); _la = _input.LA(1); if (_la==QUOTED_STRING) { { - setState(913); + setState(921); entryExpression(); - setState(918); + setState(926); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(914); + setState(922); match(COMMA); - setState(915); + setState(923); entryExpression(); } } - setState(920); + setState(928); _errHandler.sync(this); _la = _input.LA(1); } } } - setState(923); + setState(931); match(RIGHT_BRACES); } } @@ -7473,15 +7538,15 @@ public T accept(ParseTreeVisitor visitor) { public final EntryExpressionContext entryExpression() throws RecognitionException { EntryExpressionContext _localctx = new EntryExpressionContext(_ctx, getState()); - enterRule(_localctx, 176, RULE_entryExpression); + enterRule(_localctx, 178, RULE_entryExpression); try { enterOuterAlt(_localctx, 1); { - setState(925); + setState(933); ((EntryExpressionContext)_localctx).key = string(); - setState(926); + setState(934); match(COLON); - setState(927); + setState(935); ((EntryExpressionContext)_localctx).value = mapValue(); } } @@ -7526,9 +7591,9 @@ public T accept(ParseTreeVisitor visitor) { public final MapValueContext mapValue() throws RecognitionException { MapValueContext _localctx = new MapValueContext(_ctx, getState()); - enterRule(_localctx, 178, RULE_mapValue); + enterRule(_localctx, 180, RULE_mapValue); try { - setState(931); + setState(939); _errHandler.sync(this); switch (_input.LA(1)) { case QUOTED_STRING: @@ -7544,14 +7609,14 @@ public final MapValueContext mapValue() throws RecognitionException { case OPENING_BRACKET: enterOuterAlt(_localctx, 1); { - setState(929); + setState(937); constant(); } break; case LEFT_BRACES: enterOuterAlt(_localctx, 2); { - setState(930); + setState(938); mapExpression(); } break; @@ -7823,17 +7888,17 @@ public T accept(ParseTreeVisitor visitor) { public final ConstantContext constant() throws RecognitionException { ConstantContext _localctx = new ConstantContext(_ctx, getState()); - enterRule(_localctx, 180, RULE_constant); + enterRule(_localctx, 182, RULE_constant); int _la; try { - setState(975); + setState(983); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,89,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) { case 1: _localctx = new NullLiteralContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(933); + setState(941); match(NULL); } break; @@ -7841,9 +7906,9 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new QualifiedIntegerLiteralContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(934); + setState(942); integerValue(); - setState(935); + setState(943); match(UNQUOTED_IDENTIFIER); } break; @@ -7851,7 +7916,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new DecimalLiteralContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(937); + setState(945); decimalValue(); } break; @@ -7859,7 +7924,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new IntegerLiteralContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(938); + setState(946); integerValue(); } break; @@ -7867,7 +7932,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new BooleanLiteralContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(939); + setState(947); booleanValue(); } break; @@ -7875,7 +7940,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new InputParameterContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(940); + setState(948); parameter(); } break; @@ -7883,7 +7948,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new StringLiteralContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(941); + setState(949); string(); } break; @@ -7891,27 +7956,27 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new NumericArrayLiteralContext(_localctx); enterOuterAlt(_localctx, 8); { - setState(942); + setState(950); match(OPENING_BRACKET); - setState(943); + setState(951); numericValue(); - setState(948); + setState(956); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(944); + setState(952); match(COMMA); - setState(945); + setState(953); numericValue(); } } - setState(950); + setState(958); _errHandler.sync(this); _la = _input.LA(1); } - setState(951); + setState(959); match(CLOSING_BRACKET); } break; @@ -7919,27 +7984,27 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new BooleanArrayLiteralContext(_localctx); enterOuterAlt(_localctx, 9); { - setState(953); + setState(961); match(OPENING_BRACKET); - setState(954); + setState(962); booleanValue(); - setState(959); + setState(967); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(955); + setState(963); match(COMMA); - setState(956); + setState(964); booleanValue(); } } - setState(961); + setState(969); _errHandler.sync(this); _la = _input.LA(1); } - setState(962); + setState(970); match(CLOSING_BRACKET); } break; @@ -7947,27 +8012,27 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new StringArrayLiteralContext(_localctx); enterOuterAlt(_localctx, 10); { - setState(964); + setState(972); match(OPENING_BRACKET); - setState(965); + setState(973); string(); - setState(970); + setState(978); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(966); + setState(974); match(COMMA); - setState(967); + setState(975); string(); } } - setState(972); + setState(980); _errHandler.sync(this); _la = _input.LA(1); } - setState(973); + setState(981); match(CLOSING_BRACKET); } break; @@ -8010,12 +8075,12 @@ public T accept(ParseTreeVisitor visitor) { public final BooleanValueContext booleanValue() throws RecognitionException { BooleanValueContext _localctx = new BooleanValueContext(_ctx, getState()); - enterRule(_localctx, 182, RULE_booleanValue); + enterRule(_localctx, 184, RULE_booleanValue); int _la; try { enterOuterAlt(_localctx, 1); { - setState(977); + setState(985); _la = _input.LA(1); if ( !(_la==FALSE || _la==TRUE) ) { _errHandler.recoverInline(this); @@ -8068,22 +8133,22 @@ public T accept(ParseTreeVisitor visitor) { public final NumericValueContext numericValue() throws RecognitionException { NumericValueContext _localctx = new NumericValueContext(_ctx, getState()); - enterRule(_localctx, 184, RULE_numericValue); + enterRule(_localctx, 186, RULE_numericValue); try { - setState(981); + setState(989); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,91,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(979); + setState(987); decimalValue(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(980); + setState(988); integerValue(); } break; @@ -8127,17 +8192,17 @@ public T accept(ParseTreeVisitor visitor) { public final DecimalValueContext decimalValue() throws RecognitionException { DecimalValueContext _localctx = new DecimalValueContext(_ctx, getState()); - enterRule(_localctx, 186, RULE_decimalValue); + enterRule(_localctx, 188, RULE_decimalValue); int _la; try { enterOuterAlt(_localctx, 1); { - setState(984); + setState(992); _errHandler.sync(this); _la = _input.LA(1); if (_la==PLUS || _la==MINUS) { { - setState(983); + setState(991); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { _errHandler.recoverInline(this); @@ -8150,7 +8215,7 @@ public final DecimalValueContext decimalValue() throws RecognitionException { } } - setState(986); + setState(994); match(DECIMAL_LITERAL); } } @@ -8192,17 +8257,17 @@ public T accept(ParseTreeVisitor visitor) { public final IntegerValueContext integerValue() throws RecognitionException { IntegerValueContext _localctx = new IntegerValueContext(_ctx, getState()); - enterRule(_localctx, 188, RULE_integerValue); + enterRule(_localctx, 190, RULE_integerValue); int _la; try { enterOuterAlt(_localctx, 1); { - setState(989); + setState(997); _errHandler.sync(this); _la = _input.LA(1); if (_la==PLUS || _la==MINUS) { { - setState(988); + setState(996); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { _errHandler.recoverInline(this); @@ -8215,7 +8280,7 @@ public final IntegerValueContext integerValue() throws RecognitionException { } } - setState(991); + setState(999); match(INTEGER_LITERAL); } } @@ -8255,11 +8320,11 @@ public T accept(ParseTreeVisitor visitor) { public final StringContext string() throws RecognitionException { StringContext _localctx = new StringContext(_ctx, getState()); - enterRule(_localctx, 190, RULE_string); + enterRule(_localctx, 192, RULE_string); try { enterOuterAlt(_localctx, 1); { - setState(993); + setState(1001); match(QUOTED_STRING); } } @@ -8304,12 +8369,12 @@ public T accept(ParseTreeVisitor visitor) { public final ComparisonOperatorContext comparisonOperator() throws RecognitionException { ComparisonOperatorContext _localctx = new ComparisonOperatorContext(_ctx, getState()); - enterRule(_localctx, 192, RULE_comparisonOperator); + enterRule(_localctx, 194, RULE_comparisonOperator); int _la; try { enterOuterAlt(_localctx, 1); { - setState(995); + setState(1003); _la = _input.LA(1); if ( !(((((_la - 86)) & ~0x3f) == 0 && ((1L << (_la - 86)) & 125L) != 0)) ) { _errHandler.recoverInline(this); @@ -8367,12 +8432,12 @@ public T accept(ParseTreeVisitor visitor) { public final JoinCommandContext joinCommand() throws RecognitionException { JoinCommandContext _localctx = new JoinCommandContext(_ctx, getState()); - enterRule(_localctx, 194, RULE_joinCommand); + enterRule(_localctx, 196, RULE_joinCommand); int _la; try { enterOuterAlt(_localctx, 1); { - setState(997); + setState(1005); ((JoinCommandContext)_localctx).type = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 6979321856L) != 0)) ) { @@ -8383,11 +8448,11 @@ public final JoinCommandContext joinCommand() throws RecognitionException { _errHandler.reportMatch(this); consume(); } - setState(998); + setState(1006); match(JOIN); - setState(999); + setState(1007); joinTarget(); - setState(1000); + setState(1008); joinCondition(); } } @@ -8433,37 +8498,37 @@ public T accept(ParseTreeVisitor visitor) { public final JoinTargetContext joinTarget() throws RecognitionException { JoinTargetContext _localctx = new JoinTargetContext(_ctx, getState()); - enterRule(_localctx, 196, RULE_joinTarget); + enterRule(_localctx, 198, RULE_joinTarget); int _la; try { - setState(1010); + setState(1018); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,94,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,95,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(1002); + setState(1010); if (!(this.isDevVersion())) throw new FailedPredicateException(this, "this.isDevVersion()"); - setState(1003); + setState(1011); ((JoinTargetContext)_localctx).index = indexPattern(); - setState(1005); + setState(1013); _errHandler.sync(this); _la = _input.LA(1); if (_la==AS) { { - setState(1004); + setState(1012); match(AS); } } - setState(1007); + setState(1015); ((JoinTargetContext)_localctx).qualifier = match(UNQUOTED_SOURCE); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(1009); + setState(1017); ((JoinTargetContext)_localctx).index = indexPattern(); } break; @@ -8515,32 +8580,32 @@ public T accept(ParseTreeVisitor visitor) { public final JoinConditionContext joinCondition() throws RecognitionException { JoinConditionContext _localctx = new JoinConditionContext(_ctx, getState()); - enterRule(_localctx, 198, RULE_joinCondition); + enterRule(_localctx, 200, RULE_joinCondition); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(1012); + setState(1020); match(ON); - setState(1013); + setState(1021); booleanExpression(0); - setState(1018); + setState(1026); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,95,_ctx); + _alt = getInterpreter().adaptivePredict(_input,96,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(1014); + setState(1022); match(COMMA); - setState(1015); + setState(1023); booleanExpression(0); } } } - setState(1020); + setState(1028); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,95,_ctx); + _alt = getInterpreter().adaptivePredict(_input,96,_ctx); } } } @@ -8598,88 +8663,88 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlCommandContext promqlCommand() throws RecognitionException { PromqlCommandContext _localctx = new PromqlCommandContext(_ctx, getState()); - enterRule(_localctx, 200, RULE_promqlCommand); + enterRule(_localctx, 202, RULE_promqlCommand); int _la; try { int _alt; - setState(1053); + setState(1061); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,101,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,102,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(1021); + setState(1029); match(PROMQL); - setState(1025); + setState(1033); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,96,_ctx); + _alt = getInterpreter().adaptivePredict(_input,97,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(1022); + setState(1030); promqlParam(); } } } - setState(1027); + setState(1035); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,96,_ctx); + _alt = getInterpreter().adaptivePredict(_input,97,_ctx); } - setState(1031); + setState(1039); _errHandler.sync(this); _la = _input.LA(1); if (_la==UNQUOTED_IDENTIFIER || _la==QUOTED_IDENTIFIER) { { - setState(1028); + setState(1036); valueName(); - setState(1029); + setState(1037); match(ASSIGN); } } - setState(1033); + setState(1041); match(LP); - setState(1035); + setState(1043); _errHandler.sync(this); _la = _input.LA(1); do { { { - setState(1034); + setState(1042); promqlQueryPart(); } } - setState(1037); + setState(1045); _errHandler.sync(this); _la = _input.LA(1); } while ( ((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & 37867180460606881L) != 0) || ((((_la - 155)) & ~0x3f) == 0 && ((1L << (_la - 155)) & 7L) != 0) ); - setState(1039); + setState(1047); match(RP); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(1041); + setState(1049); match(PROMQL); - setState(1045); + setState(1053); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,99,_ctx); + _alt = getInterpreter().adaptivePredict(_input,100,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(1042); + setState(1050); promqlParam(); } } } - setState(1047); + setState(1055); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,99,_ctx); + _alt = getInterpreter().adaptivePredict(_input,100,_ctx); } - setState(1049); + setState(1057); _errHandler.sync(this); _alt = 1; do { @@ -8687,7 +8752,7 @@ public final PromqlCommandContext promqlCommand() throws RecognitionException { case 1: { { - setState(1048); + setState(1056); promqlQueryPart(); } } @@ -8695,9 +8760,9 @@ public final PromqlCommandContext promqlCommand() throws RecognitionException { default: throw new NoViableAltException(this); } - setState(1051); + setState(1059); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,100,_ctx); + _alt = getInterpreter().adaptivePredict(_input,101,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; @@ -8740,12 +8805,12 @@ public T accept(ParseTreeVisitor visitor) { public final ValueNameContext valueName() throws RecognitionException { ValueNameContext _localctx = new ValueNameContext(_ctx, getState()); - enterRule(_localctx, 202, RULE_valueName); + enterRule(_localctx, 204, RULE_valueName); int _la; try { enterOuterAlt(_localctx, 1); { - setState(1055); + setState(1063); _la = _input.LA(1); if ( !(_la==UNQUOTED_IDENTIFIER || _la==QUOTED_IDENTIFIER) ) { _errHandler.recoverInline(this); @@ -8801,15 +8866,15 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlParamContext promqlParam() throws RecognitionException { PromqlParamContext _localctx = new PromqlParamContext(_ctx, getState()); - enterRule(_localctx, 204, RULE_promqlParam); + enterRule(_localctx, 206, RULE_promqlParam); try { enterOuterAlt(_localctx, 1); { - setState(1057); + setState(1065); ((PromqlParamContext)_localctx).name = promqlParamName(); - setState(1058); + setState(1066); match(ASSIGN); - setState(1059); + setState(1067); ((PromqlParamContext)_localctx).value = promqlParamValue(); } } @@ -8852,12 +8917,12 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlParamNameContext promqlParamName() throws RecognitionException { PromqlParamNameContext _localctx = new PromqlParamNameContext(_ctx, getState()); - enterRule(_localctx, 206, RULE_promqlParamName); + enterRule(_localctx, 208, RULE_promqlParamName); int _la; try { enterOuterAlt(_localctx, 1); { - setState(1061); + setState(1069); _la = _input.LA(1); if ( !(((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & 1697645953286145L) != 0)) ) { _errHandler.recoverInline(this); @@ -8916,10 +8981,10 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlParamValueContext promqlParamValue() throws RecognitionException { PromqlParamValueContext _localctx = new PromqlParamValueContext(_ctx, getState()); - enterRule(_localctx, 208, RULE_promqlParamValue); + enterRule(_localctx, 210, RULE_promqlParamValue); try { int _alt; - setState(1073); + setState(1081); _errHandler.sync(this); switch (_input.LA(1)) { case QUOTED_STRING: @@ -8927,39 +8992,39 @@ public final PromqlParamValueContext promqlParamValue() throws RecognitionExcept case UNQUOTED_SOURCE: enterOuterAlt(_localctx, 1); { - setState(1063); + setState(1071); promqlIndexPattern(); - setState(1068); + setState(1076); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + _alt = getInterpreter().adaptivePredict(_input,103,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(1064); + setState(1072); match(COMMA); - setState(1065); + setState(1073); promqlIndexPattern(); } } } - setState(1070); + setState(1078); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + _alt = getInterpreter().adaptivePredict(_input,103,_ctx); } } break; case QUOTED_IDENTIFIER: enterOuterAlt(_localctx, 2); { - setState(1071); + setState(1079); match(QUOTED_IDENTIFIER); } break; case NAMED_OR_POSITIONAL_PARAM: enterOuterAlt(_localctx, 3); { - setState(1072); + setState(1080); match(NAMED_OR_POSITIONAL_PARAM); } break; @@ -9014,12 +9079,12 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlQueryContentContext promqlQueryContent() throws RecognitionException { PromqlQueryContentContext _localctx = new PromqlQueryContentContext(_ctx, getState()); - enterRule(_localctx, 210, RULE_promqlQueryContent); + enterRule(_localctx, 212, RULE_promqlQueryContent); int _la; try { enterOuterAlt(_localctx, 1); { - setState(1075); + setState(1083); _la = _input.LA(1); if ( !(((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & 37726442972251553L) != 0) || ((((_la - 155)) & ~0x3f) == 0 && ((1L << (_la - 155)) & 7L) != 0)) ) { _errHandler.recoverInline(this); @@ -9080,11 +9145,11 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlQueryPartContext promqlQueryPart() throws RecognitionException { PromqlQueryPartContext _localctx = new PromqlQueryPartContext(_ctx, getState()); - enterRule(_localctx, 212, RULE_promqlQueryPart); + enterRule(_localctx, 214, RULE_promqlQueryPart); int _la; try { int _alt; - setState(1090); + setState(1098); _errHandler.sync(this); switch (_input.LA(1)) { case QUOTED_STRING: @@ -9101,7 +9166,7 @@ public final PromqlQueryPartContext promqlQueryPart() throws RecognitionExceptio case PROMQL_OTHER_QUERY_CONTENT: enterOuterAlt(_localctx, 1); { - setState(1078); + setState(1086); _errHandler.sync(this); _alt = 1; do { @@ -9109,7 +9174,7 @@ public final PromqlQueryPartContext promqlQueryPart() throws RecognitionExceptio case 1: { { - setState(1077); + setState(1085); promqlQueryContent(); } } @@ -9117,32 +9182,32 @@ public final PromqlQueryPartContext promqlQueryPart() throws RecognitionExceptio default: throw new NoViableAltException(this); } - setState(1080); + setState(1088); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,104,_ctx); + _alt = getInterpreter().adaptivePredict(_input,105,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; case LP: enterOuterAlt(_localctx, 2); { - setState(1082); + setState(1090); match(LP); - setState(1086); + setState(1094); _errHandler.sync(this); _la = _input.LA(1); while (((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & 37867180460606881L) != 0) || ((((_la - 155)) & ~0x3f) == 0 && ((1L << (_la - 155)) & 7L) != 0)) { { { - setState(1083); + setState(1091); promqlQueryPart(); } } - setState(1088); + setState(1096); _errHandler.sync(this); _la = _input.LA(1); } - setState(1089); + setState(1097); match(RP); } break; @@ -9199,37 +9264,37 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlIndexPatternContext promqlIndexPattern() throws RecognitionException { PromqlIndexPatternContext _localctx = new PromqlIndexPatternContext(_ctx, getState()); - enterRule(_localctx, 214, RULE_promqlIndexPattern); + enterRule(_localctx, 216, RULE_promqlIndexPattern); try { - setState(1101); + setState(1109); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,107,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,108,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(1092); + setState(1100); promqlClusterString(); - setState(1093); + setState(1101); match(COLON); - setState(1094); + setState(1102); promqlUnquotedIndexString(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(1096); + setState(1104); promqlUnquotedIndexString(); - setState(1097); + setState(1105); match(CAST_OP); - setState(1098); + setState(1106); promqlSelectorString(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(1100); + setState(1108); promqlIndexString(); } break; @@ -9272,12 +9337,12 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlClusterStringContext promqlClusterString() throws RecognitionException { PromqlClusterStringContext _localctx = new PromqlClusterStringContext(_ctx, getState()); - enterRule(_localctx, 216, RULE_promqlClusterString); + enterRule(_localctx, 218, RULE_promqlClusterString); int _la; try { enterOuterAlt(_localctx, 1); { - setState(1103); + setState(1111); _la = _input.LA(1); if ( !(_la==UNQUOTED_IDENTIFIER || _la==UNQUOTED_SOURCE) ) { _errHandler.recoverInline(this); @@ -9326,12 +9391,12 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlSelectorStringContext promqlSelectorString() throws RecognitionException { PromqlSelectorStringContext _localctx = new PromqlSelectorStringContext(_ctx, getState()); - enterRule(_localctx, 218, RULE_promqlSelectorString); + enterRule(_localctx, 220, RULE_promqlSelectorString); int _la; try { enterOuterAlt(_localctx, 1); { - setState(1105); + setState(1113); _la = _input.LA(1); if ( !(_la==UNQUOTED_IDENTIFIER || _la==UNQUOTED_SOURCE) ) { _errHandler.recoverInline(this); @@ -9380,12 +9445,12 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlUnquotedIndexStringContext promqlUnquotedIndexString() throws RecognitionException { PromqlUnquotedIndexStringContext _localctx = new PromqlUnquotedIndexStringContext(_ctx, getState()); - enterRule(_localctx, 220, RULE_promqlUnquotedIndexString); + enterRule(_localctx, 222, RULE_promqlUnquotedIndexString); int _la; try { enterOuterAlt(_localctx, 1); { - setState(1107); + setState(1115); _la = _input.LA(1); if ( !(_la==UNQUOTED_IDENTIFIER || _la==UNQUOTED_SOURCE) ) { _errHandler.recoverInline(this); @@ -9435,12 +9500,12 @@ public T accept(ParseTreeVisitor visitor) { public final PromqlIndexStringContext promqlIndexString() throws RecognitionException { PromqlIndexStringContext _localctx = new PromqlIndexStringContext(_ctx, getState()); - enterRule(_localctx, 222, RULE_promqlIndexString); + enterRule(_localctx, 224, RULE_promqlIndexString); int _la; try { enterOuterAlt(_localctx, 1); { - setState(1109); + setState(1117); _la = _input.LA(1); if ( !(((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & 36591746972385281L) != 0)) ) { _errHandler.recoverInline(this); @@ -9477,15 +9542,17 @@ public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { return qualifiedName_sempred((QualifiedNameContext)_localctx, predIndex); case 28: return qualifiedNamePattern_sempred((QualifiedNamePatternContext)_localctx, predIndex); - case 61: + case 38: + return limitByGroupKey_sempred((LimitByGroupKeyContext)_localctx, predIndex); + case 62: return forkSubQueryCommand_sempred((ForkSubQueryCommandContext)_localctx, predIndex); - case 79: + case 80: return booleanExpression_sempred((BooleanExpressionContext)_localctx, predIndex); - case 83: - return operatorExpression_sempred((OperatorExpressionContext)_localctx, predIndex); case 84: + return operatorExpression_sempred((OperatorExpressionContext)_localctx, predIndex); + case 85: return primaryExpression_sempred((PrimaryExpressionContext)_localctx, predIndex); - case 98: + case 99: return joinTarget_sempred((JoinTargetContext)_localctx, predIndex); } return true; @@ -9536,48 +9603,55 @@ private boolean qualifiedNamePattern_sempred(QualifiedNamePatternContext _localc } return true; } - private boolean forkSubQueryCommand_sempred(ForkSubQueryCommandContext _localctx, int predIndex) { + private boolean limitByGroupKey_sempred(LimitByGroupKeyContext _localctx, int predIndex) { switch (predIndex) { case 8: + return this.isDevVersion(); + } + return true; + } + private boolean forkSubQueryCommand_sempred(ForkSubQueryCommandContext _localctx, int predIndex) { + switch (predIndex) { + case 9: return precpred(_ctx, 1); } return true; } private boolean booleanExpression_sempred(BooleanExpressionContext _localctx, int predIndex) { switch (predIndex) { - case 9: - return precpred(_ctx, 5); case 10: + return precpred(_ctx, 5); + case 11: return precpred(_ctx, 4); } return true; } private boolean operatorExpression_sempred(OperatorExpressionContext _localctx, int predIndex) { switch (predIndex) { - case 11: - return precpred(_ctx, 2); case 12: + return precpred(_ctx, 2); + case 13: return precpred(_ctx, 1); } return true; } private boolean primaryExpression_sempred(PrimaryExpressionContext _localctx, int predIndex) { switch (predIndex) { - case 13: + case 14: return precpred(_ctx, 1); } return true; } private boolean joinTarget_sempred(JoinTargetContext _localctx, int predIndex) { switch (predIndex) { - case 14: + case 15: return this.isDevVersion(); } return true; } public static final String _serializedATN = - "\u0004\u0001\u00a8\u0458\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001"+ + "\u0004\u0001\u00a8\u0460\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001"+ "\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004"+ "\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007"+ "\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b\u0007\u000b"+ @@ -9603,668 +9677,672 @@ private boolean joinTarget_sempred(JoinTargetContext _localctx, int predIndex) { "^\u0002_\u0007_\u0002`\u0007`\u0002a\u0007a\u0002b\u0007b\u0002c\u0007"+ "c\u0002d\u0007d\u0002e\u0007e\u0002f\u0007f\u0002g\u0007g\u0002h\u0007"+ "h\u0002i\u0007i\u0002j\u0007j\u0002k\u0007k\u0002l\u0007l\u0002m\u0007"+ - "m\u0002n\u0007n\u0002o\u0007o\u0001\u0000\u0005\u0000\u00e2\b\u0000\n"+ - "\u0000\f\u0000\u00e5\t\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001"+ - "\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+ - "\u0002\u0001\u0002\u0001\u0002\u0005\u0002\u00f3\b\u0002\n\u0002\f\u0002"+ - "\u00f6\t\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+ - "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0003\u0003\u0101\b\u0003"+ + "m\u0002n\u0007n\u0002o\u0007o\u0002p\u0007p\u0001\u0000\u0005\u0000\u00e4"+ + "\b\u0000\n\u0000\f\u0000\u00e7\t\u0000\u0001\u0000\u0001\u0000\u0001\u0000"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0005\u0002\u00f5\b\u0002\n\u0002"+ + "\f\u0002\u00f8\t\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0003\u0003"+ + "\u0103\b\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004"+ "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004"+ "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004"+ "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004"+ "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004"+ - "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0003\u0004"+ - "\u0120\b\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006"+ - "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0005\b\u012d"+ - "\b\b\n\b\f\b\u0130\t\b\u0001\t\u0001\t\u0001\t\u0003\t\u0135\b\t\u0001"+ - "\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b"+ - "\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0005\r\u0146"+ - "\b\r\n\r\f\r\u0149\t\r\u0001\r\u0003\r\u014c\b\r\u0001\u000e\u0001\u000e"+ - "\u0001\u000e\u0003\u000e\u0151\b\u000e\u0001\u000f\u0001\u000f\u0001\u000f"+ - "\u0001\u000f\u0005\u000f\u0157\b\u000f\n\u000f\f\u000f\u015a\t\u000f\u0001"+ - "\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0003\u0010\u0161"+ - "\b\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0003\u0010\u0166\b\u0010"+ - "\u0001\u0010\u0003\u0010\u0169\b\u0010\u0001\u0011\u0001\u0011\u0001\u0012"+ - "\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0001\u0015"+ - "\u0001\u0015\u0001\u0015\u0001\u0015\u0005\u0015\u0177\b\u0015\n\u0015"+ - "\f\u0015\u017a\t\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017"+ - "\u0001\u0017\u0003\u0017\u0181\b\u0017\u0001\u0017\u0001\u0017\u0003\u0017"+ - "\u0185\b\u0017\u0001\u0018\u0001\u0018\u0001\u0018\u0005\u0018\u018a\b"+ - "\u0018\n\u0018\f\u0018\u018d\t\u0018\u0001\u0019\u0001\u0019\u0001\u0019"+ - "\u0003\u0019\u0192\b\u0019\u0001\u001a\u0001\u001a\u0001\u001a\u0003\u001a"+ - "\u0197\b\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a"+ - "\u0001\u001a\u0001\u001a\u0003\u001a\u01a0\b\u001a\u0001\u001b\u0001\u001b"+ - "\u0001\u001b\u0005\u001b\u01a5\b\u001b\n\u001b\f\u001b\u01a8\t\u001b\u0001"+ - "\u001c\u0001\u001c\u0001\u001c\u0003\u001c\u01ad\b\u001c\u0001\u001c\u0001"+ + "\u0003\u0004\u0122\b\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006"+ + "\u0001\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001"+ + "\b\u0005\b\u012f\b\b\n\b\f\b\u0132\t\b\u0001\t\u0001\t\u0001\t\u0003\t"+ + "\u0137\b\t\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b"+ + "\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0005"+ + "\r\u0148\b\r\n\r\f\r\u014b\t\r\u0001\r\u0003\r\u014e\b\r\u0001\u000e\u0001"+ + "\u000e\u0001\u000e\u0003\u000e\u0153\b\u000e\u0001\u000f\u0001\u000f\u0001"+ + "\u000f\u0001\u000f\u0005\u000f\u0159\b\u000f\n\u000f\f\u000f\u015c\t\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0003\u0010"+ + "\u0163\b\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0003\u0010\u0168\b"+ + "\u0010\u0001\u0010\u0003\u0010\u016b\b\u0010\u0001\u0011\u0001\u0011\u0001"+ + "\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0001"+ + "\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0005\u0015\u0179\b\u0015\n"+ + "\u0015\f\u0015\u017c\t\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0001"+ + "\u0017\u0001\u0017\u0003\u0017\u0183\b\u0017\u0001\u0017\u0001\u0017\u0003"+ + "\u0017\u0187\b\u0017\u0001\u0018\u0001\u0018\u0001\u0018\u0005\u0018\u018c"+ + "\b\u0018\n\u0018\f\u0018\u018f\t\u0018\u0001\u0019\u0001\u0019\u0001\u0019"+ + "\u0003\u0019\u0194\b\u0019\u0001\u001a\u0001\u001a\u0001\u001a\u0003\u001a"+ + "\u0199\b\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001a\u0001\u001a\u0003\u001a\u01a2\b\u001a\u0001\u001b\u0001\u001b"+ + "\u0001\u001b\u0005\u001b\u01a7\b\u001b\n\u001b\f\u001b\u01aa\t\u001b\u0001"+ + "\u001c\u0001\u001c\u0001\u001c\u0003\u001c\u01af\b\u001c\u0001\u001c\u0001"+ "\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0003"+ - "\u001c\u01b6\b\u001c\u0001\u001d\u0001\u001d\u0001\u001d\u0005\u001d\u01bb"+ - "\b\u001d\n\u001d\f\u001d\u01be\t\u001d\u0001\u001e\u0001\u001e\u0001\u001e"+ - "\u0005\u001e\u01c3\b\u001e\n\u001e\f\u001e\u01c6\t\u001e\u0001\u001f\u0001"+ - "\u001f\u0001 \u0001 \u0001 \u0003 \u01cd\b \u0001!\u0001!\u0003!\u01d1"+ - "\b!\u0001\"\u0001\"\u0003\"\u01d5\b\"\u0001#\u0001#\u0001#\u0003#\u01da"+ - "\b#\u0001$\u0001$\u0003$\u01de\b$\u0001%\u0001%\u0001%\u0001&\u0001&\u0001"+ - "&\u0001&\u0005&\u01e7\b&\n&\f&\u01ea\t&\u0001\'\u0001\'\u0003\'\u01ee"+ - "\b\'\u0001\'\u0001\'\u0003\'\u01f2\b\'\u0001(\u0001(\u0001(\u0001)\u0001"+ - ")\u0001)\u0001*\u0001*\u0001*\u0001*\u0005*\u01fe\b*\n*\f*\u0201\t*\u0001"+ - "+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001+\u0003+\u020b\b+\u0001"+ - ",\u0001,\u0001,\u0001,\u0003,\u0211\b,\u0001-\u0001-\u0001-\u0005-\u0216"+ - "\b-\n-\f-\u0219\t-\u0001.\u0001.\u0001.\u0001.\u0001/\u0001/\u0003/\u0221"+ - "\b/\u00010\u00010\u00010\u00010\u00010\u00050\u0228\b0\n0\f0\u022b\t0"+ - "\u00011\u00011\u00011\u00012\u00012\u00012\u00013\u00013\u00013\u0001"+ - "3\u00014\u00014\u00014\u00015\u00015\u00015\u00015\u00035\u023e\b5\u0001"+ - "5\u00015\u00015\u00015\u00055\u0244\b5\n5\f5\u0247\t5\u00035\u0249\b5"+ - "\u00016\u00016\u00017\u00017\u00017\u00037\u0250\b7\u00017\u00017\u0001"+ - "8\u00018\u00018\u00019\u00019\u00019\u00019\u00039\u025b\b9\u00019\u0001"+ - "9\u00019\u00019\u00019\u00039\u0262\b9\u0001:\u0001:\u0001:\u0001;\u0004"+ - ";\u0268\b;\u000b;\f;\u0269\u0001<\u0001<\u0001<\u0001<\u0001=\u0001=\u0001"+ - "=\u0001=\u0001=\u0001=\u0005=\u0276\b=\n=\f=\u0279\t=\u0001>\u0001>\u0001"+ - "?\u0001?\u0001?\u0001?\u0003?\u0281\b?\u0001?\u0001?\u0001?\u0001?\u0001"+ - "?\u0001@\u0001@\u0001@\u0001@\u0003@\u028c\b@\u0001@\u0001@\u0001@\u0001"+ - "A\u0001A\u0001A\u0001A\u0001A\u0003A\u0296\bA\u0001A\u0001A\u0001A\u0001"+ - "A\u0003A\u029c\bA\u0003A\u029e\bA\u0001B\u0001B\u0003B\u02a2\bB\u0001"+ - "B\u0005B\u02a5\bB\nB\fB\u02a8\tB\u0001C\u0001C\u0001C\u0001C\u0001C\u0001"+ - "C\u0001C\u0001C\u0001C\u0001C\u0001C\u0003C\u02b5\bC\u0001D\u0001D\u0001"+ - "D\u0005D\u02ba\bD\nD\fD\u02bd\tD\u0001E\u0001E\u0001F\u0001F\u0001G\u0001"+ - "G\u0001G\u0001G\u0001G\u0001H\u0001H\u0001H\u0001I\u0001I\u0001I\u0001"+ - "I\u0001I\u0001J\u0001J\u0001J\u0001J\u0001J\u0001K\u0001K\u0001K\u0001"+ - "K\u0001L\u0001L\u0001L\u0001L\u0003L\u02dd\bL\u0001M\u0001M\u0003M\u02e1"+ - "\bM\u0001M\u0001M\u0001M\u0001M\u0001M\u0001M\u0001N\u0001N\u0003N\u02eb"+ - "\bN\u0001O\u0001O\u0001O\u0001O\u0001O\u0001O\u0001O\u0003O\u02f4\bO\u0001"+ - "O\u0001O\u0001O\u0001O\u0001O\u0005O\u02fb\bO\nO\fO\u02fe\tO\u0001O\u0001"+ - "O\u0001O\u0001O\u0001O\u0003O\u0305\bO\u0001O\u0001O\u0001O\u0003O\u030a"+ - "\bO\u0001O\u0001O\u0001O\u0001O\u0001O\u0001O\u0005O\u0312\bO\nO\fO\u0315"+ - "\tO\u0001P\u0001P\u0003P\u0319\bP\u0001P\u0001P\u0001P\u0001P\u0001P\u0003"+ - "P\u0320\bP\u0001P\u0001P\u0001P\u0001P\u0001P\u0003P\u0327\bP\u0001P\u0001"+ - "P\u0001P\u0001P\u0001P\u0005P\u032e\bP\nP\fP\u0331\tP\u0001P\u0001P\u0001"+ - "P\u0001P\u0003P\u0337\bP\u0001P\u0001P\u0001P\u0001P\u0001P\u0005P\u033e"+ - "\bP\nP\fP\u0341\tP\u0001P\u0001P\u0003P\u0345\bP\u0001Q\u0001Q\u0001Q"+ - "\u0003Q\u034a\bQ\u0001Q\u0001Q\u0001Q\u0001R\u0001R\u0001R\u0001R\u0001"+ - "R\u0003R\u0354\bR\u0001S\u0001S\u0001S\u0001S\u0003S\u035a\bS\u0001S\u0001"+ - "S\u0001S\u0001S\u0001S\u0001S\u0005S\u0362\bS\nS\fS\u0365\tS\u0001T\u0001"+ - "T\u0001T\u0001T\u0001T\u0001T\u0001T\u0001T\u0003T\u036f\bT\u0001T\u0001"+ - "T\u0001T\u0005T\u0374\bT\nT\fT\u0377\tT\u0001U\u0001U\u0001U\u0001U\u0001"+ - "U\u0001U\u0005U\u037f\bU\nU\fU\u0382\tU\u0001U\u0001U\u0003U\u0386\bU"+ - "\u0003U\u0388\bU\u0001U\u0001U\u0001V\u0001V\u0001V\u0003V\u038f\bV\u0001"+ - "W\u0001W\u0001W\u0001W\u0005W\u0395\bW\nW\fW\u0398\tW\u0003W\u039a\bW"+ - "\u0001W\u0001W\u0001X\u0001X\u0001X\u0001X\u0001Y\u0001Y\u0003Y\u03a4"+ - "\bY\u0001Z\u0001Z\u0001Z\u0001Z\u0001Z\u0001Z\u0001Z\u0001Z\u0001Z\u0001"+ - "Z\u0001Z\u0001Z\u0001Z\u0005Z\u03b3\bZ\nZ\fZ\u03b6\tZ\u0001Z\u0001Z\u0001"+ - "Z\u0001Z\u0001Z\u0001Z\u0005Z\u03be\bZ\nZ\fZ\u03c1\tZ\u0001Z\u0001Z\u0001"+ - "Z\u0001Z\u0001Z\u0001Z\u0005Z\u03c9\bZ\nZ\fZ\u03cc\tZ\u0001Z\u0001Z\u0003"+ - "Z\u03d0\bZ\u0001[\u0001[\u0001\\\u0001\\\u0003\\\u03d6\b\\\u0001]\u0003"+ - "]\u03d9\b]\u0001]\u0001]\u0001^\u0003^\u03de\b^\u0001^\u0001^\u0001_\u0001"+ - "_\u0001`\u0001`\u0001a\u0001a\u0001a\u0001a\u0001a\u0001b\u0001b\u0001"+ - "b\u0003b\u03ee\bb\u0001b\u0001b\u0001b\u0003b\u03f3\bb\u0001c\u0001c\u0001"+ - "c\u0001c\u0005c\u03f9\bc\nc\fc\u03fc\tc\u0001d\u0001d\u0005d\u0400\bd"+ - "\nd\fd\u0403\td\u0001d\u0001d\u0001d\u0003d\u0408\bd\u0001d\u0001d\u0004"+ - "d\u040c\bd\u000bd\fd\u040d\u0001d\u0001d\u0001d\u0001d\u0005d\u0414\b"+ - "d\nd\fd\u0417\td\u0001d\u0004d\u041a\bd\u000bd\fd\u041b\u0003d\u041e\b"+ - "d\u0001e\u0001e\u0001f\u0001f\u0001f\u0001f\u0001g\u0001g\u0001h\u0001"+ - "h\u0001h\u0005h\u042b\bh\nh\fh\u042e\th\u0001h\u0001h\u0003h\u0432\bh"+ - "\u0001i\u0001i\u0001j\u0004j\u0437\bj\u000bj\fj\u0438\u0001j\u0001j\u0005"+ - "j\u043d\bj\nj\fj\u0440\tj\u0001j\u0003j\u0443\bj\u0001k\u0001k\u0001k"+ - "\u0001k\u0001k\u0001k\u0001k\u0001k\u0001k\u0003k\u044e\bk\u0001l\u0001"+ - "l\u0001m\u0001m\u0001n\u0001n\u0001o\u0001o\u0001o\u0000\u0005\u0004z"+ - "\u009e\u00a6\u00a8p\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014"+ - "\u0016\u0018\u001a\u001c\u001e \"$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`bdfh"+ - "jlnprtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a\u008c\u008e\u0090\u0092"+ - "\u0094\u0096\u0098\u009a\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa"+ - "\u00ac\u00ae\u00b0\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2"+ - "\u00c4\u00c6\u00c8\u00ca\u00cc\u00ce\u00d0\u00d2\u00d4\u00d6\u00d8\u00da"+ - "\u00dc\u00de\u0000\u000e\u0002\u0000::qq\u0001\u0000kl\u0002\u0000>>E"+ - "E\u0002\u0000HHKK\u0002\u0000//::\u0001\u0000]^\u0001\u0000_a\u0002\u0000"+ - "GGTT\u0002\u0000VVX\\\u0002\u0000\u001d\u001d\u001f \u0003\u0000::eek"+ - "l\b\u0000::??ABDDeeklqq\u009b\u009d\u0002\u0000kkqq\u0003\u0000::kkqq"+ - "\u0489\u0000\u00e3\u0001\u0000\u0000\u0000\u0002\u00e9\u0001\u0000\u0000"+ - "\u0000\u0004\u00ec\u0001\u0000\u0000\u0000\u0006\u0100\u0001\u0000\u0000"+ - "\u0000\b\u011f\u0001\u0000\u0000\u0000\n\u0121\u0001\u0000\u0000\u0000"+ - "\f\u0124\u0001\u0000\u0000\u0000\u000e\u0126\u0001\u0000\u0000\u0000\u0010"+ - "\u0129\u0001\u0000\u0000\u0000\u0012\u0134\u0001\u0000\u0000\u0000\u0014"+ - "\u0138\u0001\u0000\u0000\u0000\u0016\u013b\u0001\u0000\u0000\u0000\u0018"+ - "\u013e\u0001\u0000\u0000\u0000\u001a\u0142\u0001\u0000\u0000\u0000\u001c"+ - "\u0150\u0001\u0000\u0000\u0000\u001e\u0152\u0001\u0000\u0000\u0000 \u0168"+ - "\u0001\u0000\u0000\u0000\"\u016a\u0001\u0000\u0000\u0000$\u016c\u0001"+ - "\u0000\u0000\u0000&\u016e\u0001\u0000\u0000\u0000(\u0170\u0001\u0000\u0000"+ - "\u0000*\u0172\u0001\u0000\u0000\u0000,\u017b\u0001\u0000\u0000\u0000."+ - "\u017e\u0001\u0000\u0000\u00000\u0186\u0001\u0000\u0000\u00002\u018e\u0001"+ - "\u0000\u0000\u00004\u019f\u0001\u0000\u0000\u00006\u01a1\u0001\u0000\u0000"+ - "\u00008\u01b5\u0001\u0000\u0000\u0000:\u01b7\u0001\u0000\u0000\u0000<"+ - "\u01bf\u0001\u0000\u0000\u0000>\u01c7\u0001\u0000\u0000\u0000@\u01cc\u0001"+ - "\u0000\u0000\u0000B\u01d0\u0001\u0000\u0000\u0000D\u01d4\u0001\u0000\u0000"+ - "\u0000F\u01d9\u0001\u0000\u0000\u0000H\u01dd\u0001\u0000\u0000\u0000J"+ - "\u01df\u0001\u0000\u0000\u0000L\u01e2\u0001\u0000\u0000\u0000N\u01eb\u0001"+ - "\u0000\u0000\u0000P\u01f3\u0001\u0000\u0000\u0000R\u01f6\u0001\u0000\u0000"+ - "\u0000T\u01f9\u0001\u0000\u0000\u0000V\u020a\u0001\u0000\u0000\u0000X"+ - "\u020c\u0001\u0000\u0000\u0000Z\u0212\u0001\u0000\u0000\u0000\\\u021a"+ - "\u0001\u0000\u0000\u0000^\u0220\u0001\u0000\u0000\u0000`\u0222\u0001\u0000"+ - "\u0000\u0000b\u022c\u0001\u0000\u0000\u0000d\u022f\u0001\u0000\u0000\u0000"+ - "f\u0232\u0001\u0000\u0000\u0000h\u0236\u0001\u0000\u0000\u0000j\u0239"+ - "\u0001\u0000\u0000\u0000l\u024a\u0001\u0000\u0000\u0000n\u024f\u0001\u0000"+ - "\u0000\u0000p\u0253\u0001\u0000\u0000\u0000r\u0256\u0001\u0000\u0000\u0000"+ - "t\u0263\u0001\u0000\u0000\u0000v\u0267\u0001\u0000\u0000\u0000x\u026b"+ - "\u0001\u0000\u0000\u0000z\u026f\u0001\u0000\u0000\u0000|\u027a\u0001\u0000"+ - "\u0000\u0000~\u027c\u0001\u0000\u0000\u0000\u0080\u0287\u0001\u0000\u0000"+ - "\u0000\u0082\u029d\u0001\u0000\u0000\u0000\u0084\u029f\u0001\u0000\u0000"+ - "\u0000\u0086\u02b4\u0001\u0000\u0000\u0000\u0088\u02b6\u0001\u0000\u0000"+ - "\u0000\u008a\u02be\u0001\u0000\u0000\u0000\u008c\u02c0\u0001\u0000\u0000"+ - "\u0000\u008e\u02c2\u0001\u0000\u0000\u0000\u0090\u02c7\u0001\u0000\u0000"+ - "\u0000\u0092\u02ca\u0001\u0000\u0000\u0000\u0094\u02cf\u0001\u0000\u0000"+ - "\u0000\u0096\u02d4\u0001\u0000\u0000\u0000\u0098\u02d8\u0001\u0000\u0000"+ - "\u0000\u009a\u02de\u0001\u0000\u0000\u0000\u009c\u02ea\u0001\u0000\u0000"+ - "\u0000\u009e\u0309\u0001\u0000\u0000\u0000\u00a0\u0344\u0001\u0000\u0000"+ - "\u0000\u00a2\u0346\u0001\u0000\u0000\u0000\u00a4\u0353\u0001\u0000\u0000"+ - "\u0000\u00a6\u0359\u0001\u0000\u0000\u0000\u00a8\u036e\u0001\u0000\u0000"+ - "\u0000\u00aa\u0378\u0001\u0000\u0000\u0000\u00ac\u038e\u0001\u0000\u0000"+ - "\u0000\u00ae\u0390\u0001\u0000\u0000\u0000\u00b0\u039d\u0001\u0000\u0000"+ - "\u0000\u00b2\u03a3\u0001\u0000\u0000\u0000\u00b4\u03cf\u0001\u0000\u0000"+ - "\u0000\u00b6\u03d1\u0001\u0000\u0000\u0000\u00b8\u03d5\u0001\u0000\u0000"+ - "\u0000\u00ba\u03d8\u0001\u0000\u0000\u0000\u00bc\u03dd\u0001\u0000\u0000"+ - "\u0000\u00be\u03e1\u0001\u0000\u0000\u0000\u00c0\u03e3\u0001\u0000\u0000"+ - "\u0000\u00c2\u03e5\u0001\u0000\u0000\u0000\u00c4\u03f2\u0001\u0000\u0000"+ - "\u0000\u00c6\u03f4\u0001\u0000\u0000\u0000\u00c8\u041d\u0001\u0000\u0000"+ - "\u0000\u00ca\u041f\u0001\u0000\u0000\u0000\u00cc\u0421\u0001\u0000\u0000"+ - "\u0000\u00ce\u0425\u0001\u0000\u0000\u0000\u00d0\u0431\u0001\u0000\u0000"+ - "\u0000\u00d2\u0433\u0001\u0000\u0000\u0000\u00d4\u0442\u0001\u0000\u0000"+ - "\u0000\u00d6\u044d\u0001\u0000\u0000\u0000\u00d8\u044f\u0001\u0000\u0000"+ - "\u0000\u00da\u0451\u0001\u0000\u0000\u0000\u00dc\u0453\u0001\u0000\u0000"+ - "\u0000\u00de\u0455\u0001\u0000\u0000\u0000\u00e0\u00e2\u0003\u0096K\u0000"+ - "\u00e1\u00e0\u0001\u0000\u0000\u0000\u00e2\u00e5\u0001\u0000\u0000\u0000"+ - "\u00e3\u00e1\u0001\u0000\u0000\u0000\u00e3\u00e4\u0001\u0000\u0000\u0000"+ - "\u00e4\u00e6\u0001\u0000\u0000\u0000\u00e5\u00e3\u0001\u0000\u0000\u0000"+ - "\u00e6\u00e7\u0003\u0002\u0001\u0000\u00e7\u00e8\u0005\u0000\u0000\u0001"+ - "\u00e8\u0001\u0001\u0000\u0000\u0000\u00e9\u00ea\u0003\u0004\u0002\u0000"+ - "\u00ea\u00eb\u0005\u0000\u0000\u0001\u00eb\u0003\u0001\u0000\u0000\u0000"+ - "\u00ec\u00ed\u0006\u0002\uffff\uffff\u0000\u00ed\u00ee\u0003\u0006\u0003"+ - "\u0000\u00ee\u00f4\u0001\u0000\u0000\u0000\u00ef\u00f0\n\u0001\u0000\u0000"+ - "\u00f0\u00f1\u00059\u0000\u0000\u00f1\u00f3\u0003\b\u0004\u0000\u00f2"+ - "\u00ef\u0001\u0000\u0000\u0000\u00f3\u00f6\u0001\u0000\u0000\u0000\u00f4"+ - "\u00f2\u0001\u0000\u0000\u0000\u00f4\u00f5\u0001\u0000\u0000\u0000\u00f5"+ - "\u0005\u0001\u0000\u0000\u0000\u00f6\u00f4\u0001\u0000\u0000\u0000\u00f7"+ - "\u0101\u0003\u0014\n\u0000\u00f8\u0101\u0003\u000e\u0007\u0000\u00f9\u0101"+ - "\u0003h4\u0000\u00fa\u0101\u0003\u0016\u000b\u0000\u00fb\u0101\u0003\u00c8"+ - "d\u0000\u00fc\u00fd\u0004\u0003\u0001\u0000\u00fd\u0101\u0003d2\u0000"+ - "\u00fe\u00ff\u0004\u0003\u0002\u0000\u00ff\u0101\u0003\u0018\f\u0000\u0100"+ - "\u00f7\u0001\u0000\u0000\u0000\u0100\u00f8\u0001\u0000\u0000\u0000\u0100"+ - "\u00f9\u0001\u0000\u0000\u0000\u0100\u00fa\u0001\u0000\u0000\u0000\u0100"+ - "\u00fb\u0001\u0000\u0000\u0000\u0100\u00fc\u0001\u0000\u0000\u0000\u0100"+ - "\u00fe\u0001\u0000\u0000\u0000\u0101\u0007\u0001\u0000\u0000\u0000\u0102"+ - "\u0120\u0003,\u0016\u0000\u0103\u0120\u0003\n\u0005\u0000\u0104\u0120"+ - "\u0003P(\u0000\u0105\u0120\u0003J%\u0000\u0106\u0120\u0003.\u0017\u0000"+ - "\u0107\u0120\u0003L&\u0000\u0108\u0120\u0003R)\u0000\u0109\u0120\u0003"+ - "T*\u0000\u010a\u0120\u0003X,\u0000\u010b\u0120\u0003`0\u0000\u010c\u0120"+ - "\u0003j5\u0000\u010d\u0120\u0003b1\u0000\u010e\u0120\u0003\u00c2a\u0000"+ - "\u010f\u0120\u0003r9\u0000\u0110\u0120\u0003\u0080@\u0000\u0111\u0120"+ - "\u0003p8\u0000\u0112\u0120\u0003t:\u0000\u0113\u0120\u0003~?\u0000\u0114"+ - "\u0120\u0003\u0082A\u0000\u0115\u0120\u0003\u0084B\u0000\u0116\u0120\u0003"+ - "\u0092I\u0000\u0117\u0120\u0003\u008aE\u0000\u0118\u0120\u0003\u0094J"+ - "\u0000\u0119\u0120\u0003\u008cF\u0000\u011a\u0120\u0003\u009aM\u0000\u011b"+ - "\u011c\u0004\u0004\u0003\u0000\u011c\u0120\u0003\u008eG\u0000\u011d\u011e"+ - "\u0004\u0004\u0004\u0000\u011e\u0120\u0003\u0090H\u0000\u011f\u0102\u0001"+ - "\u0000\u0000\u0000\u011f\u0103\u0001\u0000\u0000\u0000\u011f\u0104\u0001"+ - "\u0000\u0000\u0000\u011f\u0105\u0001\u0000\u0000\u0000\u011f\u0106\u0001"+ - "\u0000\u0000\u0000\u011f\u0107\u0001\u0000\u0000\u0000\u011f\u0108\u0001"+ - "\u0000\u0000\u0000\u011f\u0109\u0001\u0000\u0000\u0000\u011f\u010a\u0001"+ - "\u0000\u0000\u0000\u011f\u010b\u0001\u0000\u0000\u0000\u011f\u010c\u0001"+ - "\u0000\u0000\u0000\u011f\u010d\u0001\u0000\u0000\u0000\u011f\u010e\u0001"+ - "\u0000\u0000\u0000\u011f\u010f\u0001\u0000\u0000\u0000\u011f\u0110\u0001"+ - "\u0000\u0000\u0000\u011f\u0111\u0001\u0000\u0000\u0000\u011f\u0112\u0001"+ - "\u0000\u0000\u0000\u011f\u0113\u0001\u0000\u0000\u0000\u011f\u0114\u0001"+ - "\u0000\u0000\u0000\u011f\u0115\u0001\u0000\u0000\u0000\u011f\u0116\u0001"+ - "\u0000\u0000\u0000\u011f\u0117\u0001\u0000\u0000\u0000\u011f\u0118\u0001"+ - "\u0000\u0000\u0000\u011f\u0119\u0001\u0000\u0000\u0000\u011f\u011a\u0001"+ - "\u0000\u0000\u0000\u011f\u011b\u0001\u0000\u0000\u0000\u011f\u011d\u0001"+ - "\u0000\u0000\u0000\u0120\t\u0001\u0000\u0000\u0000\u0121\u0122\u0005\u0011"+ - "\u0000\u0000\u0122\u0123\u0003\u009eO\u0000\u0123\u000b\u0001\u0000\u0000"+ - "\u0000\u0124\u0125\u0003>\u001f\u0000\u0125\r\u0001\u0000\u0000\u0000"+ - "\u0126\u0127\u0005\r\u0000\u0000\u0127\u0128\u0003\u0010\b\u0000\u0128"+ - "\u000f\u0001\u0000\u0000\u0000\u0129\u012e\u0003\u0012\t\u0000\u012a\u012b"+ - "\u0005D\u0000\u0000\u012b\u012d\u0003\u0012\t\u0000\u012c\u012a\u0001"+ - "\u0000\u0000\u0000\u012d\u0130\u0001\u0000\u0000\u0000\u012e\u012c\u0001"+ - "\u0000\u0000\u0000\u012e\u012f\u0001\u0000\u0000\u0000\u012f\u0011\u0001"+ - "\u0000\u0000\u0000\u0130\u012e\u0001\u0000\u0000\u0000\u0131\u0132\u0003"+ - "4\u001a\u0000\u0132\u0133\u0005?\u0000\u0000\u0133\u0135\u0001\u0000\u0000"+ - "\u0000\u0134\u0131\u0001\u0000\u0000\u0000\u0134\u0135\u0001\u0000\u0000"+ - "\u0000\u0135\u0136\u0001\u0000\u0000\u0000\u0136\u0137\u0003\u009eO\u0000"+ - "\u0137\u0013\u0001\u0000\u0000\u0000\u0138\u0139\u0005\u0016\u0000\u0000"+ - "\u0139\u013a\u0003\u001a\r\u0000\u013a\u0015\u0001\u0000\u0000\u0000\u013b"+ - "\u013c\u0005\u0017\u0000\u0000\u013c\u013d\u0003\u001a\r\u0000\u013d\u0017"+ - "\u0001\u0000\u0000\u0000\u013e\u013f\u0005\u0018\u0000\u0000\u013f\u0140"+ - "\u0003H$\u0000\u0140\u0141\u0003^/\u0000\u0141\u0019\u0001\u0000\u0000"+ - "\u0000\u0142\u0147\u0003\u001c\u000e\u0000\u0143\u0144\u0005D\u0000\u0000"+ - "\u0144\u0146\u0003\u001c\u000e\u0000\u0145\u0143\u0001\u0000\u0000\u0000"+ - "\u0146\u0149\u0001\u0000\u0000\u0000\u0147\u0145\u0001\u0000\u0000\u0000"+ - "\u0147\u0148\u0001\u0000\u0000\u0000\u0148\u014b\u0001\u0000\u0000\u0000"+ - "\u0149\u0147\u0001\u0000\u0000\u0000\u014a\u014c\u0003*\u0015\u0000\u014b"+ - "\u014a\u0001\u0000\u0000\u0000\u014b\u014c\u0001\u0000\u0000\u0000\u014c"+ - "\u001b\u0001\u0000\u0000\u0000\u014d\u0151\u0003 \u0010\u0000\u014e\u014f"+ - "\u0004\u000e\u0005\u0000\u014f\u0151\u0003\u001e\u000f\u0000\u0150\u014d"+ - "\u0001\u0000\u0000\u0000\u0150\u014e\u0001\u0000\u0000\u0000\u0151\u001d"+ - "\u0001\u0000\u0000\u0000\u0152\u0153\u0005i\u0000\u0000\u0153\u0158\u0003"+ - "\u0014\n\u0000\u0154\u0155\u00059\u0000\u0000\u0155\u0157\u0003\b\u0004"+ - "\u0000\u0156\u0154\u0001\u0000\u0000\u0000\u0157\u015a\u0001\u0000\u0000"+ - "\u0000\u0158\u0156\u0001\u0000\u0000\u0000\u0158\u0159\u0001\u0000\u0000"+ - "\u0000\u0159\u015b\u0001\u0000\u0000\u0000\u015a\u0158\u0001\u0000\u0000"+ - "\u0000\u015b\u015c\u0005j\u0000\u0000\u015c\u001f\u0001\u0000\u0000\u0000"+ - "\u015d\u015e\u0003\"\u0011\u0000\u015e\u015f\u0005B\u0000\u0000\u015f"+ - "\u0161\u0001\u0000\u0000\u0000\u0160\u015d\u0001\u0000\u0000\u0000\u0160"+ - "\u0161\u0001\u0000\u0000\u0000\u0161\u0162\u0001\u0000\u0000\u0000\u0162"+ - "\u0165\u0003&\u0013\u0000\u0163\u0164\u0005A\u0000\u0000\u0164\u0166\u0003"+ - "$\u0012\u0000\u0165\u0163\u0001\u0000\u0000\u0000\u0165\u0166\u0001\u0000"+ - "\u0000\u0000\u0166\u0169\u0001\u0000\u0000\u0000\u0167\u0169\u0003(\u0014"+ - "\u0000\u0168\u0160\u0001\u0000\u0000\u0000\u0168\u0167\u0001\u0000\u0000"+ - "\u0000\u0169!\u0001\u0000\u0000\u0000\u016a\u016b\u0005q\u0000\u0000\u016b"+ - "#\u0001\u0000\u0000\u0000\u016c\u016d\u0005q\u0000\u0000\u016d%\u0001"+ - "\u0000\u0000\u0000\u016e\u016f\u0005q\u0000\u0000\u016f\'\u0001\u0000"+ - "\u0000\u0000\u0170\u0171\u0007\u0000\u0000\u0000\u0171)\u0001\u0000\u0000"+ - "\u0000\u0172\u0173\u0005p\u0000\u0000\u0173\u0178\u0005q\u0000\u0000\u0174"+ - "\u0175\u0005D\u0000\u0000\u0175\u0177\u0005q\u0000\u0000\u0176\u0174\u0001"+ - "\u0000\u0000\u0000\u0177\u017a\u0001\u0000\u0000\u0000\u0178\u0176\u0001"+ - "\u0000\u0000\u0000\u0178\u0179\u0001\u0000\u0000\u0000\u0179+\u0001\u0000"+ - "\u0000\u0000\u017a\u0178\u0001\u0000\u0000\u0000\u017b\u017c\u0005\t\u0000"+ - "\u0000\u017c\u017d\u0003\u0010\b\u0000\u017d-\u0001\u0000\u0000\u0000"+ - "\u017e\u0180\u0005\u0010\u0000\u0000\u017f\u0181\u00030\u0018\u0000\u0180"+ - "\u017f\u0001\u0000\u0000\u0000\u0180\u0181\u0001\u0000\u0000\u0000\u0181"+ - "\u0184\u0001\u0000\u0000\u0000\u0182\u0183\u0005@\u0000\u0000\u0183\u0185"+ - "\u0003\u0010\b\u0000\u0184\u0182\u0001\u0000\u0000\u0000\u0184\u0185\u0001"+ - "\u0000\u0000\u0000\u0185/\u0001\u0000\u0000\u0000\u0186\u018b\u00032\u0019"+ - "\u0000\u0187\u0188\u0005D\u0000\u0000\u0188\u018a\u00032\u0019\u0000\u0189"+ - "\u0187\u0001\u0000\u0000\u0000\u018a\u018d\u0001\u0000\u0000\u0000\u018b"+ - "\u0189\u0001\u0000\u0000\u0000\u018b\u018c\u0001\u0000\u0000\u0000\u018c"+ - "1\u0001\u0000\u0000\u0000\u018d\u018b\u0001\u0000\u0000\u0000\u018e\u0191"+ - "\u0003\u0012\t\u0000\u018f\u0190\u0005\u0011\u0000\u0000\u0190\u0192\u0003"+ - "\u009eO\u0000\u0191\u018f\u0001\u0000\u0000\u0000\u0191\u0192\u0001\u0000"+ - "\u0000\u0000\u01923\u0001\u0000\u0000\u0000\u0193\u0194\u0004\u001a\u0006"+ - "\u0000\u0194\u0196\u0005g\u0000\u0000\u0195\u0197\u0005k\u0000\u0000\u0196"+ - "\u0195\u0001\u0000\u0000\u0000\u0196\u0197\u0001\u0000\u0000\u0000\u0197"+ - "\u0198\u0001\u0000\u0000\u0000\u0198\u0199\u0005h\u0000\u0000\u0199\u019a"+ - "\u0005F\u0000\u0000\u019a\u019b\u0005g\u0000\u0000\u019b\u019c\u00036"+ - "\u001b\u0000\u019c\u019d\u0005h\u0000\u0000\u019d\u01a0\u0001\u0000\u0000"+ - "\u0000\u019e\u01a0\u00036\u001b\u0000\u019f\u0193\u0001\u0000\u0000\u0000"+ - "\u019f\u019e\u0001\u0000\u0000\u0000\u01a05\u0001\u0000\u0000\u0000\u01a1"+ - "\u01a6\u0003F#\u0000\u01a2\u01a3\u0005F\u0000\u0000\u01a3\u01a5\u0003"+ - "F#\u0000\u01a4\u01a2\u0001\u0000\u0000\u0000\u01a5\u01a8\u0001\u0000\u0000"+ - "\u0000\u01a6\u01a4\u0001\u0000\u0000\u0000\u01a6\u01a7\u0001\u0000\u0000"+ - "\u0000\u01a77\u0001\u0000\u0000\u0000\u01a8\u01a6\u0001\u0000\u0000\u0000"+ - "\u01a9\u01aa\u0004\u001c\u0007\u0000\u01aa\u01ac\u0005g\u0000\u0000\u01ab"+ - "\u01ad\u0005\u0094\u0000\u0000\u01ac\u01ab\u0001\u0000\u0000\u0000\u01ac"+ - "\u01ad\u0001\u0000\u0000\u0000\u01ad\u01ae\u0001\u0000\u0000\u0000\u01ae"+ - "\u01af\u0005h\u0000\u0000\u01af\u01b0\u0005F\u0000\u0000\u01b0\u01b1\u0005"+ - "g\u0000\u0000\u01b1\u01b2\u0003:\u001d\u0000\u01b2\u01b3\u0005h\u0000"+ - "\u0000\u01b3\u01b6\u0001\u0000\u0000\u0000\u01b4\u01b6\u0003:\u001d\u0000"+ - "\u01b5\u01a9\u0001\u0000\u0000\u0000\u01b5\u01b4\u0001\u0000\u0000\u0000"+ - "\u01b69\u0001\u0000\u0000\u0000\u01b7\u01bc\u0003@ \u0000\u01b8\u01b9"+ - "\u0005F\u0000\u0000\u01b9\u01bb\u0003@ \u0000\u01ba\u01b8\u0001\u0000"+ - "\u0000\u0000\u01bb\u01be\u0001\u0000\u0000\u0000\u01bc\u01ba\u0001\u0000"+ - "\u0000\u0000\u01bc\u01bd\u0001\u0000\u0000\u0000\u01bd;\u0001\u0000\u0000"+ - "\u0000\u01be\u01bc\u0001\u0000\u0000\u0000\u01bf\u01c4\u00038\u001c\u0000"+ - "\u01c0\u01c1\u0005D\u0000\u0000\u01c1\u01c3\u00038\u001c\u0000\u01c2\u01c0"+ - "\u0001\u0000\u0000\u0000\u01c3\u01c6\u0001\u0000\u0000\u0000\u01c4\u01c2"+ - "\u0001\u0000\u0000\u0000\u01c4\u01c5\u0001\u0000\u0000\u0000\u01c5=\u0001"+ - "\u0000\u0000\u0000\u01c6\u01c4\u0001\u0000\u0000\u0000\u01c7\u01c8\u0007"+ - "\u0001\u0000\u0000\u01c8?\u0001\u0000\u0000\u0000\u01c9\u01cd\u0005\u0094"+ - "\u0000\u0000\u01ca\u01cd\u0003B!\u0000\u01cb\u01cd\u0003D\"\u0000\u01cc"+ - "\u01c9\u0001\u0000\u0000\u0000\u01cc\u01ca\u0001\u0000\u0000\u0000\u01cc"+ - "\u01cb\u0001\u0000\u0000\u0000\u01cdA\u0001\u0000\u0000\u0000\u01ce\u01d1"+ - "\u0005R\u0000\u0000\u01cf\u01d1\u0005e\u0000\u0000\u01d0\u01ce\u0001\u0000"+ - "\u0000\u0000\u01d0\u01cf\u0001\u0000\u0000\u0000\u01d1C\u0001\u0000\u0000"+ - "\u0000\u01d2\u01d5\u0005d\u0000\u0000\u01d3\u01d5\u0005f\u0000\u0000\u01d4"+ - "\u01d2\u0001\u0000\u0000\u0000\u01d4\u01d3\u0001\u0000\u0000\u0000\u01d5"+ - "E\u0001\u0000\u0000\u0000\u01d6\u01da\u0003>\u001f\u0000\u01d7\u01da\u0003"+ - "B!\u0000\u01d8\u01da\u0003D\"\u0000\u01d9\u01d6\u0001\u0000\u0000\u0000"+ - "\u01d9\u01d7\u0001\u0000\u0000\u0000\u01d9\u01d8\u0001\u0000\u0000\u0000"+ - "\u01daG\u0001\u0000\u0000\u0000\u01db\u01de\u0003\u00be_\u0000\u01dc\u01de"+ - "\u0003B!\u0000\u01dd\u01db\u0001\u0000\u0000\u0000\u01dd\u01dc\u0001\u0000"+ - "\u0000\u0000\u01deI\u0001\u0000\u0000\u0000\u01df\u01e0\u0005\u000b\u0000"+ - "\u0000\u01e0\u01e1\u0003\u00b4Z\u0000\u01e1K\u0001\u0000\u0000\u0000\u01e2"+ - "\u01e3\u0005\u000f\u0000\u0000\u01e3\u01e8\u0003N\'\u0000\u01e4\u01e5"+ - "\u0005D\u0000\u0000\u01e5\u01e7\u0003N\'\u0000\u01e6\u01e4\u0001\u0000"+ - "\u0000\u0000\u01e7\u01ea\u0001\u0000\u0000\u0000\u01e8\u01e6\u0001\u0000"+ - "\u0000\u0000\u01e8\u01e9\u0001\u0000\u0000\u0000\u01e9M\u0001\u0000\u0000"+ - "\u0000\u01ea\u01e8\u0001\u0000\u0000\u0000\u01eb\u01ed\u0003\u009eO\u0000"+ - "\u01ec\u01ee\u0007\u0002\u0000\u0000\u01ed\u01ec\u0001\u0000\u0000\u0000"+ - "\u01ed\u01ee\u0001\u0000\u0000\u0000\u01ee\u01f1\u0001\u0000\u0000\u0000"+ - "\u01ef\u01f0\u0005O\u0000\u0000\u01f0\u01f2\u0007\u0003\u0000\u0000\u01f1"+ - "\u01ef\u0001\u0000\u0000\u0000\u01f1\u01f2\u0001\u0000\u0000\u0000\u01f2"+ - "O\u0001\u0000\u0000\u0000\u01f3\u01f4\u0005%\u0000\u0000\u01f4\u01f5\u0003"+ - "<\u001e\u0000\u01f5Q\u0001\u0000\u0000\u0000\u01f6\u01f7\u0005$\u0000"+ - "\u0000\u01f7\u01f8\u0003<\u001e\u0000\u01f8S\u0001\u0000\u0000\u0000\u01f9"+ - "\u01fa\u0005(\u0000\u0000\u01fa\u01ff\u0003V+\u0000\u01fb\u01fc\u0005"+ - "D\u0000\u0000\u01fc\u01fe\u0003V+\u0000\u01fd\u01fb\u0001\u0000\u0000"+ - "\u0000\u01fe\u0201\u0001\u0000\u0000\u0000\u01ff\u01fd\u0001\u0000\u0000"+ - "\u0000\u01ff\u0200\u0001\u0000\u0000\u0000\u0200U\u0001\u0000\u0000\u0000"+ - "\u0201\u01ff\u0001\u0000\u0000\u0000\u0202\u0203\u00038\u001c\u0000\u0203"+ - "\u0204\u0005\u009e\u0000\u0000\u0204\u0205\u00038\u001c\u0000\u0205\u020b"+ - "\u0001\u0000\u0000\u0000\u0206\u0207\u00038\u001c\u0000\u0207\u0208\u0005"+ - "?\u0000\u0000\u0208\u0209\u00038\u001c\u0000\u0209\u020b\u0001\u0000\u0000"+ - "\u0000\u020a\u0202\u0001\u0000\u0000\u0000\u020a\u0206\u0001\u0000\u0000"+ - "\u0000\u020bW\u0001\u0000\u0000\u0000\u020c\u020d\u0005\b\u0000\u0000"+ - "\u020d\u020e\u0003\u00a8T\u0000\u020e\u0210\u0003\u00be_\u0000\u020f\u0211"+ - "\u0003Z-\u0000\u0210\u020f\u0001\u0000\u0000\u0000\u0210\u0211\u0001\u0000"+ - "\u0000\u0000\u0211Y\u0001\u0000\u0000\u0000\u0212\u0217\u0003\\.\u0000"+ - "\u0213\u0214\u0005D\u0000\u0000\u0214\u0216\u0003\\.\u0000\u0215\u0213"+ - "\u0001\u0000\u0000\u0000\u0216\u0219\u0001\u0000\u0000\u0000\u0217\u0215"+ - "\u0001\u0000\u0000\u0000\u0217\u0218\u0001\u0000\u0000\u0000\u0218[\u0001"+ - "\u0000\u0000\u0000\u0219\u0217\u0001\u0000\u0000\u0000\u021a\u021b\u0003"+ - ">\u001f\u0000\u021b\u021c\u0005?\u0000\u0000\u021c\u021d\u0003\u00b4Z"+ - "\u0000\u021d]\u0001\u0000\u0000\u0000\u021e\u021f\u0005U\u0000\u0000\u021f"+ - "\u0221\u0003\u00aeW\u0000\u0220\u021e\u0001\u0000\u0000\u0000\u0220\u0221"+ - "\u0001\u0000\u0000\u0000\u0221_\u0001\u0000\u0000\u0000\u0222\u0223\u0005"+ - "\n\u0000\u0000\u0223\u0224\u0003\u00a8T\u0000\u0224\u0229\u0003\u00be"+ - "_\u0000\u0225\u0226\u0005D\u0000\u0000\u0226\u0228\u0003\u00be_\u0000"+ - "\u0227\u0225\u0001\u0000\u0000\u0000\u0228\u022b\u0001\u0000\u0000\u0000"+ - "\u0229\u0227\u0001\u0000\u0000\u0000\u0229\u022a\u0001\u0000\u0000\u0000"+ - "\u022aa\u0001\u0000\u0000\u0000\u022b\u0229\u0001\u0000\u0000\u0000\u022c"+ - "\u022d\u0005#\u0000\u0000\u022d\u022e\u00034\u001a\u0000\u022ec\u0001"+ - "\u0000\u0000\u0000\u022f\u0230\u0005\u0006\u0000\u0000\u0230\u0231\u0003"+ - "f3\u0000\u0231e\u0001\u0000\u0000\u0000\u0232\u0233\u0005i\u0000\u0000"+ - "\u0233\u0234\u0003\u0004\u0002\u0000\u0234\u0235\u0005j\u0000\u0000\u0235"+ - "g\u0001\u0000\u0000\u0000\u0236\u0237\u0005*\u0000\u0000\u0237\u0238\u0005"+ - "\u00a5\u0000\u0000\u0238i\u0001\u0000\u0000\u0000\u0239\u023a\u0005\u0005"+ - "\u0000\u0000\u023a\u023d\u0003l6\u0000\u023b\u023c\u0005P\u0000\u0000"+ - "\u023c\u023e\u00038\u001c\u0000\u023d\u023b\u0001\u0000\u0000\u0000\u023d"+ - "\u023e\u0001\u0000\u0000\u0000\u023e\u0248\u0001\u0000\u0000\u0000\u023f"+ - "\u0240\u0005U\u0000\u0000\u0240\u0245\u0003n7\u0000\u0241\u0242\u0005"+ - "D\u0000\u0000\u0242\u0244\u0003n7\u0000\u0243\u0241\u0001\u0000\u0000"+ - "\u0000\u0244\u0247\u0001\u0000\u0000\u0000\u0245\u0243\u0001\u0000\u0000"+ - "\u0000\u0245\u0246\u0001\u0000\u0000\u0000\u0246\u0249\u0001\u0000\u0000"+ - "\u0000\u0247\u0245\u0001\u0000\u0000\u0000\u0248\u023f\u0001\u0000\u0000"+ - "\u0000\u0248\u0249\u0001\u0000\u0000\u0000\u0249k\u0001\u0000\u0000\u0000"+ - "\u024a\u024b\u0007\u0004\u0000\u0000\u024bm\u0001\u0000\u0000\u0000\u024c"+ - "\u024d\u00038\u001c\u0000\u024d\u024e\u0005?\u0000\u0000\u024e\u0250\u0001"+ - "\u0000\u0000\u0000\u024f\u024c\u0001\u0000\u0000\u0000\u024f\u0250\u0001"+ - "\u0000\u0000\u0000\u0250\u0251\u0001\u0000\u0000\u0000\u0251\u0252\u0003"+ - "8\u001c\u0000\u0252o\u0001\u0000\u0000\u0000\u0253\u0254\u0005\u000e\u0000"+ - "\u0000\u0254\u0255\u0003\u00b4Z\u0000\u0255q\u0001\u0000\u0000\u0000\u0256"+ - "\u0257\u0005\u0004\u0000\u0000\u0257\u025a\u00034\u001a\u0000\u0258\u0259"+ - "\u0005P\u0000\u0000\u0259\u025b\u00034\u001a\u0000\u025a\u0258\u0001\u0000"+ - "\u0000\u0000\u025a\u025b\u0001\u0000\u0000\u0000\u025b\u0261\u0001\u0000"+ - "\u0000\u0000\u025c\u025d\u0005\u009e\u0000\u0000\u025d\u025e\u00034\u001a"+ - "\u0000\u025e\u025f\u0005D\u0000\u0000\u025f\u0260\u00034\u001a\u0000\u0260"+ - "\u0262\u0001\u0000\u0000\u0000\u0261\u025c\u0001\u0000\u0000\u0000\u0261"+ - "\u0262\u0001\u0000\u0000\u0000\u0262s\u0001\u0000\u0000\u0000\u0263\u0264"+ - "\u0005\u0019\u0000\u0000\u0264\u0265\u0003v;\u0000\u0265u\u0001\u0000"+ - "\u0000\u0000\u0266\u0268\u0003x<\u0000\u0267\u0266\u0001\u0000\u0000\u0000"+ - "\u0268\u0269\u0001\u0000\u0000\u0000\u0269\u0267\u0001\u0000\u0000\u0000"+ - "\u0269\u026a\u0001\u0000\u0000\u0000\u026aw\u0001\u0000\u0000\u0000\u026b"+ - "\u026c\u0005i\u0000\u0000\u026c\u026d\u0003z=\u0000\u026d\u026e\u0005"+ - "j\u0000\u0000\u026ey\u0001\u0000\u0000\u0000\u026f\u0270\u0006=\uffff"+ - "\uffff\u0000\u0270\u0271\u0003|>\u0000\u0271\u0277\u0001\u0000\u0000\u0000"+ - "\u0272\u0273\n\u0001\u0000\u0000\u0273\u0274\u00059\u0000\u0000\u0274"+ - "\u0276\u0003|>\u0000\u0275\u0272\u0001\u0000\u0000\u0000\u0276\u0279\u0001"+ - "\u0000\u0000\u0000\u0277\u0275\u0001\u0000\u0000\u0000\u0277\u0278\u0001"+ - "\u0000\u0000\u0000\u0278{\u0001\u0000\u0000\u0000\u0279\u0277\u0001\u0000"+ - "\u0000\u0000\u027a\u027b\u0003\b\u0004\u0000\u027b}\u0001\u0000\u0000"+ - "\u0000\u027c\u0280\u0005\f\u0000\u0000\u027d\u027e\u00034\u001a\u0000"+ - "\u027e\u027f\u0005?\u0000\u0000\u027f\u0281\u0001\u0000\u0000\u0000\u0280"+ - "\u027d\u0001\u0000\u0000\u0000\u0280\u0281\u0001\u0000\u0000\u0000\u0281"+ - "\u0282\u0001\u0000\u0000\u0000\u0282\u0283\u0003\u00b4Z\u0000\u0283\u0284"+ - "\u0005P\u0000\u0000\u0284\u0285\u0003\u0010\b\u0000\u0285\u0286\u0003"+ - "^/\u0000\u0286\u007f\u0001\u0000\u0000\u0000\u0287\u028b\u0005\u0007\u0000"+ - "\u0000\u0288\u0289\u00034\u001a\u0000\u0289\u028a\u0005?\u0000\u0000\u028a"+ - "\u028c\u0001\u0000\u0000\u0000\u028b\u0288\u0001\u0000\u0000\u0000\u028b"+ - "\u028c\u0001\u0000\u0000\u0000\u028c\u028d\u0001\u0000\u0000\u0000\u028d"+ - "\u028e\u0003\u00a8T\u0000\u028e\u028f\u0003^/\u0000\u028f\u0081\u0001"+ - "\u0000\u0000\u0000\u0290\u0291\u0005\u001b\u0000\u0000\u0291\u0292\u0005"+ - "~\u0000\u0000\u0292\u0295\u00030\u0018\u0000\u0293\u0294\u0005@\u0000"+ - "\u0000\u0294\u0296\u0003\u0010\b\u0000\u0295\u0293\u0001\u0000\u0000\u0000"+ - "\u0295\u0296\u0001\u0000\u0000\u0000\u0296\u029e\u0001\u0000\u0000\u0000"+ - "\u0297\u0298\u0005\u001c\u0000\u0000\u0298\u029b\u00030\u0018\u0000\u0299"+ - "\u029a\u0005@\u0000\u0000\u029a\u029c\u0003\u0010\b\u0000\u029b\u0299"+ - "\u0001\u0000\u0000\u0000\u029b\u029c\u0001\u0000\u0000\u0000\u029c\u029e"+ - "\u0001\u0000\u0000\u0000\u029d\u0290\u0001\u0000\u0000\u0000\u029d\u0297"+ - "\u0001\u0000\u0000\u0000\u029e\u0083\u0001\u0000\u0000\u0000\u029f\u02a1"+ - "\u0005\u001a\u0000\u0000\u02a0\u02a2\u0003>\u001f\u0000\u02a1\u02a0\u0001"+ - "\u0000\u0000\u0000\u02a1\u02a2\u0001\u0000\u0000\u0000\u02a2\u02a6\u0001"+ - "\u0000\u0000\u0000\u02a3\u02a5\u0003\u0086C\u0000\u02a4\u02a3\u0001\u0000"+ - "\u0000\u0000\u02a5\u02a8\u0001\u0000\u0000\u0000\u02a6\u02a4\u0001\u0000"+ - "\u0000\u0000\u02a6\u02a7\u0001\u0000\u0000\u0000\u02a7\u0085\u0001\u0000"+ - "\u0000\u0000\u02a8\u02a6\u0001\u0000\u0000\u0000\u02a9\u02aa\u0005y\u0000"+ - "\u0000\u02aa\u02ab\u0005@\u0000\u0000\u02ab\u02b5\u00034\u001a\u0000\u02ac"+ - "\u02ad\u0005z\u0000\u0000\u02ad\u02ae\u0005@\u0000\u0000\u02ae\u02b5\u0003"+ - "\u0088D\u0000\u02af\u02b0\u0005x\u0000\u0000\u02b0\u02b1\u0005@\u0000"+ - "\u0000\u02b1\u02b5\u00034\u001a\u0000\u02b2\u02b3\u0005U\u0000\u0000\u02b3"+ - "\u02b5\u0003\u00aeW\u0000\u02b4\u02a9\u0001\u0000\u0000\u0000\u02b4\u02ac"+ - "\u0001\u0000\u0000\u0000\u02b4\u02af\u0001\u0000\u0000\u0000\u02b4\u02b2"+ - "\u0001\u0000\u0000\u0000\u02b5\u0087\u0001\u0000\u0000\u0000\u02b6\u02bb"+ - "\u00034\u001a\u0000\u02b7\u02b8\u0005D\u0000\u0000\u02b8\u02ba\u00034"+ - "\u001a\u0000\u02b9\u02b7\u0001\u0000\u0000\u0000\u02ba\u02bd\u0001\u0000"+ - "\u0000\u0000\u02bb\u02b9\u0001\u0000\u0000\u0000\u02bb\u02bc\u0001\u0000"+ - "\u0000\u0000\u02bc\u0089\u0001\u0000\u0000\u0000\u02bd\u02bb\u0001\u0000"+ - "\u0000\u0000\u02be\u02bf\u0005\u0013\u0000\u0000\u02bf\u008b\u0001\u0000"+ - "\u0000\u0000\u02c0\u02c1\u0005\u0015\u0000\u0000\u02c1\u008d\u0001\u0000"+ - "\u0000\u0000\u02c2\u02c3\u0005!\u0000\u0000\u02c3\u02c4\u0003 \u0010\u0000"+ - "\u02c4\u02c5\u0005P\u0000\u0000\u02c5\u02c6\u0003<\u001e\u0000\u02c6\u008f"+ - "\u0001\u0000\u0000\u0000\u02c7\u02c8\u0005&\u0000\u0000\u02c8\u02c9\u0003"+ - "<\u001e\u0000\u02c9\u0091\u0001\u0000\u0000\u0000\u02ca\u02cb\u0005\u0012"+ - "\u0000\u0000\u02cb\u02cc\u00034\u001a\u0000\u02cc\u02cd\u0005?\u0000\u0000"+ - "\u02cd\u02ce\u0003\u00a8T\u0000\u02ce\u0093\u0001\u0000\u0000\u0000\u02cf"+ - "\u02d0\u0005\u0014\u0000\u0000\u02d0\u02d1\u00034\u001a\u0000\u02d1\u02d2"+ - "\u0005?\u0000\u0000\u02d2\u02d3\u0003\u00a8T\u0000\u02d3\u0095\u0001\u0000"+ - "\u0000\u0000\u02d4\u02d5\u0005)\u0000\u0000\u02d5\u02d6\u0003\u0098L\u0000"+ - "\u02d6\u02d7\u0005C\u0000\u0000\u02d7\u0097\u0001\u0000\u0000\u0000\u02d8"+ - "\u02d9\u0003>\u001f\u0000\u02d9\u02dc\u0005?\u0000\u0000\u02da\u02dd\u0003"+ - "\u00b4Z\u0000\u02db\u02dd\u0003\u00aeW\u0000\u02dc\u02da\u0001\u0000\u0000"+ - "\u0000\u02dc\u02db\u0001\u0000\u0000\u0000\u02dd\u0099\u0001\u0000\u0000"+ - "\u0000\u02de\u02e0\u0005\"\u0000\u0000\u02df\u02e1\u0003\u009cN\u0000"+ - "\u02e0\u02df\u0001\u0000\u0000\u0000\u02e0\u02e1\u0001\u0000\u0000\u0000"+ - "\u02e1\u02e2\u0001\u0000\u0000\u0000\u02e2\u02e3\u0005P\u0000\u0000\u02e3"+ - "\u02e4\u00034\u001a\u0000\u02e4\u02e5\u0005\u008d\u0000\u0000\u02e5\u02e6"+ - "\u0003\u00bc^\u0000\u02e6\u02e7\u0003^/\u0000\u02e7\u009b\u0001\u0000"+ - "\u0000\u0000\u02e8\u02eb\u0003B!\u0000\u02e9\u02eb\u0003\u00a8T\u0000"+ - "\u02ea\u02e8\u0001\u0000\u0000\u0000\u02ea\u02e9\u0001\u0000\u0000\u0000"+ - "\u02eb\u009d\u0001\u0000\u0000\u0000\u02ec\u02ed\u0006O\uffff\uffff\u0000"+ - "\u02ed\u02ee\u0005M\u0000\u0000\u02ee\u030a\u0003\u009eO\b\u02ef\u030a"+ - "\u0003\u00a4R\u0000\u02f0\u030a\u0003\u00a0P\u0000\u02f1\u02f3\u0003\u00a4"+ - "R\u0000\u02f2\u02f4\u0005M\u0000\u0000\u02f3\u02f2\u0001\u0000\u0000\u0000"+ - "\u02f3\u02f4\u0001\u0000\u0000\u0000\u02f4\u02f5\u0001\u0000\u0000\u0000"+ - "\u02f5\u02f6\u0005I\u0000\u0000\u02f6\u02f7\u0005i\u0000\u0000\u02f7\u02fc"+ - "\u0003\u00a4R\u0000\u02f8\u02f9\u0005D\u0000\u0000\u02f9\u02fb\u0003\u00a4"+ - "R\u0000\u02fa\u02f8\u0001\u0000\u0000\u0000\u02fb\u02fe\u0001\u0000\u0000"+ - "\u0000\u02fc\u02fa\u0001\u0000\u0000\u0000\u02fc\u02fd\u0001\u0000\u0000"+ - "\u0000\u02fd\u02ff\u0001\u0000\u0000\u0000\u02fe\u02fc\u0001\u0000\u0000"+ - "\u0000\u02ff\u0300\u0005j\u0000\u0000\u0300\u030a\u0001\u0000\u0000\u0000"+ - "\u0301\u0302\u0003\u00a4R\u0000\u0302\u0304\u0005J\u0000\u0000\u0303\u0305"+ - "\u0005M\u0000\u0000\u0304\u0303\u0001\u0000\u0000\u0000\u0304\u0305\u0001"+ - "\u0000\u0000\u0000\u0305\u0306\u0001\u0000\u0000\u0000\u0306\u0307\u0005"+ - "N\u0000\u0000\u0307\u030a\u0001\u0000\u0000\u0000\u0308\u030a\u0003\u00a2"+ - "Q\u0000\u0309\u02ec\u0001\u0000\u0000\u0000\u0309\u02ef\u0001\u0000\u0000"+ - "\u0000\u0309\u02f0\u0001\u0000\u0000\u0000\u0309\u02f1\u0001\u0000\u0000"+ - "\u0000\u0309\u0301\u0001\u0000\u0000\u0000\u0309\u0308\u0001\u0000\u0000"+ - "\u0000\u030a\u0313\u0001\u0000\u0000\u0000\u030b\u030c\n\u0005\u0000\u0000"+ - "\u030c\u030d\u0005=\u0000\u0000\u030d\u0312\u0003\u009eO\u0006\u030e\u030f"+ - "\n\u0004\u0000\u0000\u030f\u0310\u0005Q\u0000\u0000\u0310\u0312\u0003"+ - "\u009eO\u0005\u0311\u030b\u0001\u0000\u0000\u0000\u0311\u030e\u0001\u0000"+ - "\u0000\u0000\u0312\u0315\u0001\u0000\u0000\u0000\u0313\u0311\u0001\u0000"+ - "\u0000\u0000\u0313\u0314\u0001\u0000\u0000\u0000\u0314\u009f\u0001\u0000"+ - "\u0000\u0000\u0315\u0313\u0001\u0000\u0000\u0000\u0316\u0318\u0003\u00a4"+ - "R\u0000\u0317\u0319\u0005M\u0000\u0000\u0318\u0317\u0001\u0000\u0000\u0000"+ - "\u0318\u0319\u0001\u0000\u0000\u0000\u0319\u031a\u0001\u0000\u0000\u0000"+ - "\u031a\u031b\u0005L\u0000\u0000\u031b\u031c\u0003H$\u0000\u031c\u0345"+ - "\u0001\u0000\u0000\u0000\u031d\u031f\u0003\u00a4R\u0000\u031e\u0320\u0005"+ - "M\u0000\u0000\u031f\u031e\u0001\u0000\u0000\u0000\u031f\u0320\u0001\u0000"+ - "\u0000\u0000\u0320\u0321\u0001\u0000\u0000\u0000\u0321\u0322\u0005S\u0000"+ - "\u0000\u0322\u0323\u0003H$\u0000\u0323\u0345\u0001\u0000\u0000\u0000\u0324"+ - "\u0326\u0003\u00a4R\u0000\u0325\u0327\u0005M\u0000\u0000\u0326\u0325\u0001"+ - "\u0000\u0000\u0000\u0326\u0327\u0001\u0000\u0000\u0000\u0327\u0328\u0001"+ - "\u0000\u0000\u0000\u0328\u0329\u0005L\u0000\u0000\u0329\u032a\u0005i\u0000"+ - "\u0000\u032a\u032f\u0003H$\u0000\u032b\u032c\u0005D\u0000\u0000\u032c"+ - "\u032e\u0003H$\u0000\u032d\u032b\u0001\u0000\u0000\u0000\u032e\u0331\u0001"+ - "\u0000\u0000\u0000\u032f\u032d\u0001\u0000\u0000\u0000\u032f\u0330\u0001"+ - "\u0000\u0000\u0000\u0330\u0332\u0001\u0000\u0000\u0000\u0331\u032f\u0001"+ - "\u0000\u0000\u0000\u0332\u0333\u0005j\u0000\u0000\u0333\u0345\u0001\u0000"+ - "\u0000\u0000\u0334\u0336\u0003\u00a4R\u0000\u0335\u0337\u0005M\u0000\u0000"+ - "\u0336\u0335\u0001\u0000\u0000\u0000\u0336\u0337\u0001\u0000\u0000\u0000"+ - "\u0337\u0338\u0001\u0000\u0000\u0000\u0338\u0339\u0005S\u0000\u0000\u0339"+ - "\u033a\u0005i\u0000\u0000\u033a\u033f\u0003H$\u0000\u033b\u033c\u0005"+ - "D\u0000\u0000\u033c\u033e\u0003H$\u0000\u033d\u033b\u0001\u0000\u0000"+ - "\u0000\u033e\u0341\u0001\u0000\u0000\u0000\u033f\u033d\u0001\u0000\u0000"+ - "\u0000\u033f\u0340\u0001\u0000\u0000\u0000\u0340\u0342\u0001\u0000\u0000"+ - "\u0000\u0341\u033f\u0001\u0000\u0000\u0000\u0342\u0343\u0005j\u0000\u0000"+ - "\u0343\u0345\u0001\u0000\u0000\u0000\u0344\u0316\u0001\u0000\u0000\u0000"+ - "\u0344\u031d\u0001\u0000\u0000\u0000\u0344\u0324\u0001\u0000\u0000\u0000"+ - "\u0344\u0334\u0001\u0000\u0000\u0000\u0345\u00a1\u0001\u0000\u0000\u0000"+ - "\u0346\u0349\u00034\u001a\u0000\u0347\u0348\u0005A\u0000\u0000\u0348\u034a"+ - "\u0003\f\u0006\u0000\u0349\u0347\u0001\u0000\u0000\u0000\u0349\u034a\u0001"+ - "\u0000\u0000\u0000\u034a\u034b\u0001\u0000\u0000\u0000\u034b\u034c\u0005"+ - "B\u0000\u0000\u034c\u034d\u0003\u00b4Z\u0000\u034d\u00a3\u0001\u0000\u0000"+ - "\u0000\u034e\u0354\u0003\u00a6S\u0000\u034f\u0350\u0003\u00a6S\u0000\u0350"+ - "\u0351\u0003\u00c0`\u0000\u0351\u0352\u0003\u00a6S\u0000\u0352\u0354\u0001"+ - "\u0000\u0000\u0000\u0353\u034e\u0001\u0000\u0000\u0000\u0353\u034f\u0001"+ - "\u0000\u0000\u0000\u0354\u00a5\u0001\u0000\u0000\u0000\u0355\u0356\u0006"+ - "S\uffff\uffff\u0000\u0356\u035a\u0003\u00a8T\u0000\u0357\u0358\u0007\u0005"+ - "\u0000\u0000\u0358\u035a\u0003\u00a6S\u0003\u0359\u0355\u0001\u0000\u0000"+ - "\u0000\u0359\u0357\u0001\u0000\u0000\u0000\u035a\u0363\u0001\u0000\u0000"+ - "\u0000\u035b\u035c\n\u0002\u0000\u0000\u035c\u035d\u0007\u0006\u0000\u0000"+ - "\u035d\u0362\u0003\u00a6S\u0003\u035e\u035f\n\u0001\u0000\u0000\u035f"+ - "\u0360\u0007\u0005\u0000\u0000\u0360\u0362\u0003\u00a6S\u0002\u0361\u035b"+ - "\u0001\u0000\u0000\u0000\u0361\u035e\u0001\u0000\u0000\u0000\u0362\u0365"+ - "\u0001\u0000\u0000\u0000\u0363\u0361\u0001\u0000\u0000\u0000\u0363\u0364"+ - "\u0001\u0000\u0000\u0000\u0364\u00a7\u0001\u0000\u0000\u0000\u0365\u0363"+ - "\u0001\u0000\u0000\u0000\u0366\u0367\u0006T\uffff\uffff\u0000\u0367\u036f"+ - "\u0003\u00b4Z\u0000\u0368\u036f\u00034\u001a\u0000\u0369\u036f\u0003\u00aa"+ - "U\u0000\u036a\u036b\u0005i\u0000\u0000\u036b\u036c\u0003\u009eO\u0000"+ - "\u036c\u036d\u0005j\u0000\u0000\u036d\u036f\u0001\u0000\u0000\u0000\u036e"+ - "\u0366\u0001\u0000\u0000\u0000\u036e\u0368\u0001\u0000\u0000\u0000\u036e"+ - "\u0369\u0001\u0000\u0000\u0000\u036e\u036a\u0001\u0000\u0000\u0000\u036f"+ - "\u0375\u0001\u0000\u0000\u0000\u0370\u0371\n\u0001\u0000\u0000\u0371\u0372"+ - "\u0005A\u0000\u0000\u0372\u0374\u0003\f\u0006\u0000\u0373\u0370\u0001"+ - "\u0000\u0000\u0000\u0374\u0377\u0001\u0000\u0000\u0000\u0375\u0373\u0001"+ - "\u0000\u0000\u0000\u0375\u0376\u0001\u0000\u0000\u0000\u0376\u00a9\u0001"+ - "\u0000\u0000\u0000\u0377\u0375\u0001\u0000\u0000\u0000\u0378\u0379\u0003"+ - "\u00acV\u0000\u0379\u0387\u0005i\u0000\u0000\u037a\u0388\u0005_\u0000"+ - "\u0000\u037b\u0380\u0003\u009eO\u0000\u037c\u037d\u0005D\u0000\u0000\u037d"+ - "\u037f\u0003\u009eO\u0000\u037e\u037c\u0001\u0000\u0000\u0000\u037f\u0382"+ - "\u0001\u0000\u0000\u0000\u0380\u037e\u0001\u0000\u0000\u0000\u0380\u0381"+ - "\u0001\u0000\u0000\u0000\u0381\u0385\u0001\u0000\u0000\u0000\u0382\u0380"+ - "\u0001\u0000\u0000\u0000\u0383\u0384\u0005D\u0000\u0000\u0384\u0386\u0003"+ - "\u00aeW\u0000\u0385\u0383\u0001\u0000\u0000\u0000\u0385\u0386\u0001\u0000"+ - "\u0000\u0000\u0386\u0388\u0001\u0000\u0000\u0000\u0387\u037a\u0001\u0000"+ - "\u0000\u0000\u0387\u037b\u0001\u0000\u0000\u0000\u0387\u0388\u0001\u0000"+ - "\u0000\u0000\u0388\u0389\u0001\u0000\u0000\u0000\u0389\u038a\u0005j\u0000"+ - "\u0000\u038a\u00ab\u0001\u0000\u0000\u0000\u038b\u038f\u0003F#\u0000\u038c"+ - "\u038f\u0005H\u0000\u0000\u038d\u038f\u0005K\u0000\u0000\u038e\u038b\u0001"+ - "\u0000\u0000\u0000\u038e\u038c\u0001\u0000\u0000\u0000\u038e\u038d\u0001"+ - "\u0000\u0000\u0000\u038f\u00ad\u0001\u0000\u0000\u0000\u0390\u0399\u0005"+ - "b\u0000\u0000\u0391\u0396\u0003\u00b0X\u0000\u0392\u0393\u0005D\u0000"+ - "\u0000\u0393\u0395\u0003\u00b0X\u0000\u0394\u0392\u0001\u0000\u0000\u0000"+ - "\u0395\u0398\u0001\u0000\u0000\u0000\u0396\u0394\u0001\u0000\u0000\u0000"+ - "\u0396\u0397\u0001\u0000\u0000\u0000\u0397\u039a\u0001\u0000\u0000\u0000"+ - "\u0398\u0396\u0001\u0000\u0000\u0000\u0399\u0391\u0001\u0000\u0000\u0000"+ - "\u0399\u039a\u0001\u0000\u0000\u0000\u039a\u039b\u0001\u0000\u0000\u0000"+ - "\u039b\u039c\u0005c\u0000\u0000\u039c\u00af\u0001\u0000\u0000\u0000\u039d"+ - "\u039e\u0003\u00be_\u0000\u039e\u039f\u0005B\u0000\u0000\u039f\u03a0\u0003"+ - "\u00b2Y\u0000\u03a0\u00b1\u0001\u0000\u0000\u0000\u03a1\u03a4\u0003\u00b4"+ - "Z\u0000\u03a2\u03a4\u0003\u00aeW\u0000\u03a3\u03a1\u0001\u0000\u0000\u0000"+ - "\u03a3\u03a2\u0001\u0000\u0000\u0000\u03a4\u00b3\u0001\u0000\u0000\u0000"+ - "\u03a5\u03d0\u0005N\u0000\u0000\u03a6\u03a7\u0003\u00bc^\u0000\u03a7\u03a8"+ - "\u0005k\u0000\u0000\u03a8\u03d0\u0001\u0000\u0000\u0000\u03a9\u03d0\u0003"+ - "\u00ba]\u0000\u03aa\u03d0\u0003\u00bc^\u0000\u03ab\u03d0\u0003\u00b6["+ - "\u0000\u03ac\u03d0\u0003B!\u0000\u03ad\u03d0\u0003\u00be_\u0000\u03ae"+ - "\u03af\u0005g\u0000\u0000\u03af\u03b4\u0003\u00b8\\\u0000\u03b0\u03b1"+ - "\u0005D\u0000\u0000\u03b1\u03b3\u0003\u00b8\\\u0000\u03b2\u03b0\u0001"+ - "\u0000\u0000\u0000\u03b3\u03b6\u0001\u0000\u0000\u0000\u03b4\u03b2\u0001"+ - "\u0000\u0000\u0000\u03b4\u03b5\u0001\u0000\u0000\u0000\u03b5\u03b7\u0001"+ - "\u0000\u0000\u0000\u03b6\u03b4\u0001\u0000\u0000\u0000\u03b7\u03b8\u0005"+ - "h\u0000\u0000\u03b8\u03d0\u0001\u0000\u0000\u0000\u03b9\u03ba\u0005g\u0000"+ - "\u0000\u03ba\u03bf\u0003\u00b6[\u0000\u03bb\u03bc\u0005D\u0000\u0000\u03bc"+ - "\u03be\u0003\u00b6[\u0000\u03bd\u03bb\u0001\u0000\u0000\u0000\u03be\u03c1"+ - "\u0001\u0000\u0000\u0000\u03bf\u03bd\u0001\u0000\u0000\u0000\u03bf\u03c0"+ - "\u0001\u0000\u0000\u0000\u03c0\u03c2\u0001\u0000\u0000\u0000\u03c1\u03bf"+ - "\u0001\u0000\u0000\u0000\u03c2\u03c3\u0005h\u0000\u0000\u03c3\u03d0\u0001"+ - "\u0000\u0000\u0000\u03c4\u03c5\u0005g\u0000\u0000\u03c5\u03ca\u0003\u00be"+ - "_\u0000\u03c6\u03c7\u0005D\u0000\u0000\u03c7\u03c9\u0003\u00be_\u0000"+ - "\u03c8\u03c6\u0001\u0000\u0000\u0000\u03c9\u03cc\u0001\u0000\u0000\u0000"+ - "\u03ca\u03c8\u0001\u0000\u0000\u0000\u03ca\u03cb\u0001\u0000\u0000\u0000"+ - "\u03cb\u03cd\u0001\u0000\u0000\u0000\u03cc\u03ca\u0001\u0000\u0000\u0000"+ - "\u03cd\u03ce\u0005h\u0000\u0000\u03ce\u03d0\u0001\u0000\u0000\u0000\u03cf"+ - "\u03a5\u0001\u0000\u0000\u0000\u03cf\u03a6\u0001\u0000\u0000\u0000\u03cf"+ - "\u03a9\u0001\u0000\u0000\u0000\u03cf\u03aa\u0001\u0000\u0000\u0000\u03cf"+ - "\u03ab\u0001\u0000\u0000\u0000\u03cf\u03ac\u0001\u0000\u0000\u0000\u03cf"+ - "\u03ad\u0001\u0000\u0000\u0000\u03cf\u03ae\u0001\u0000\u0000\u0000\u03cf"+ - "\u03b9\u0001\u0000\u0000\u0000\u03cf\u03c4\u0001\u0000\u0000\u0000\u03d0"+ - "\u00b5\u0001\u0000\u0000\u0000\u03d1\u03d2\u0007\u0007\u0000\u0000\u03d2"+ - "\u00b7\u0001\u0000\u0000\u0000\u03d3\u03d6\u0003\u00ba]\u0000\u03d4\u03d6"+ - "\u0003\u00bc^\u0000\u03d5\u03d3\u0001\u0000\u0000\u0000\u03d5\u03d4\u0001"+ - "\u0000\u0000\u0000\u03d6\u00b9\u0001\u0000\u0000\u0000\u03d7\u03d9\u0007"+ - "\u0005\u0000\u0000\u03d8\u03d7\u0001\u0000\u0000\u0000\u03d8\u03d9\u0001"+ - "\u0000\u0000\u0000\u03d9\u03da\u0001\u0000\u0000\u0000\u03da\u03db\u0005"+ - "<\u0000\u0000\u03db\u00bb\u0001\u0000\u0000\u0000\u03dc\u03de\u0007\u0005"+ - "\u0000\u0000\u03dd\u03dc\u0001\u0000\u0000\u0000\u03dd\u03de\u0001\u0000"+ - "\u0000\u0000\u03de\u03df\u0001\u0000\u0000\u0000\u03df\u03e0\u0005;\u0000"+ - "\u0000\u03e0\u00bd\u0001\u0000\u0000\u0000\u03e1\u03e2\u0005:\u0000\u0000"+ - "\u03e2\u00bf\u0001\u0000\u0000\u0000\u03e3\u03e4\u0007\b\u0000\u0000\u03e4"+ - "\u00c1\u0001\u0000\u0000\u0000\u03e5\u03e6\u0007\t\u0000\u0000\u03e6\u03e7"+ - "\u0005\u0082\u0000\u0000\u03e7\u03e8\u0003\u00c4b\u0000\u03e8\u03e9\u0003"+ - "\u00c6c\u0000\u03e9\u00c3\u0001\u0000\u0000\u0000\u03ea\u03eb\u0004b\u000e"+ - "\u0000\u03eb\u03ed\u0003 \u0010\u0000\u03ec\u03ee\u0005\u009e\u0000\u0000"+ - "\u03ed\u03ec\u0001\u0000\u0000\u0000\u03ed\u03ee\u0001\u0000\u0000\u0000"+ - "\u03ee\u03ef\u0001\u0000\u0000\u0000\u03ef\u03f0\u0005q\u0000\u0000\u03f0"+ - "\u03f3\u0001\u0000\u0000\u0000\u03f1\u03f3\u0003 \u0010\u0000\u03f2\u03ea"+ - "\u0001\u0000\u0000\u0000\u03f2\u03f1\u0001\u0000\u0000\u0000\u03f3\u00c5"+ - "\u0001\u0000\u0000\u0000\u03f4\u03f5\u0005P\u0000\u0000\u03f5\u03fa\u0003"+ - "\u009eO\u0000\u03f6\u03f7\u0005D\u0000\u0000\u03f7\u03f9\u0003\u009eO"+ - "\u0000\u03f8\u03f6\u0001\u0000\u0000\u0000\u03f9\u03fc\u0001\u0000\u0000"+ - "\u0000\u03fa\u03f8\u0001\u0000\u0000\u0000\u03fa\u03fb\u0001\u0000\u0000"+ - "\u0000\u03fb\u00c7\u0001\u0000\u0000\u0000\u03fc\u03fa\u0001\u0000\u0000"+ - "\u0000\u03fd\u0401\u0005\'\u0000\u0000\u03fe\u0400\u0003\u00ccf\u0000"+ - "\u03ff\u03fe\u0001\u0000\u0000\u0000\u0400\u0403\u0001\u0000\u0000\u0000"+ - "\u0401\u03ff\u0001\u0000\u0000\u0000\u0401\u0402\u0001\u0000\u0000\u0000"+ - "\u0402\u0407\u0001\u0000\u0000\u0000\u0403\u0401\u0001\u0000\u0000\u0000"+ - "\u0404\u0405\u0003\u00cae\u0000\u0405\u0406\u0005?\u0000\u0000\u0406\u0408"+ - "\u0001\u0000\u0000\u0000\u0407\u0404\u0001\u0000\u0000\u0000\u0407\u0408"+ - "\u0001\u0000\u0000\u0000\u0408\u0409\u0001\u0000\u0000\u0000\u0409\u040b"+ - "\u0005i\u0000\u0000\u040a\u040c\u0003\u00d4j\u0000\u040b\u040a\u0001\u0000"+ - "\u0000\u0000\u040c\u040d\u0001\u0000\u0000\u0000\u040d\u040b\u0001\u0000"+ - "\u0000\u0000\u040d\u040e\u0001\u0000\u0000\u0000\u040e\u040f\u0001\u0000"+ - "\u0000\u0000\u040f\u0410\u0005j\u0000\u0000\u0410\u041e\u0001\u0000\u0000"+ - "\u0000\u0411\u0415\u0005\'\u0000\u0000\u0412\u0414\u0003\u00ccf\u0000"+ - "\u0413\u0412\u0001\u0000\u0000\u0000\u0414\u0417\u0001\u0000\u0000\u0000"+ - "\u0415\u0413\u0001\u0000\u0000\u0000\u0415\u0416\u0001\u0000\u0000\u0000"+ - "\u0416\u0419\u0001\u0000\u0000\u0000\u0417\u0415\u0001\u0000\u0000\u0000"+ - "\u0418\u041a\u0003\u00d4j\u0000\u0419\u0418\u0001\u0000\u0000\u0000\u041a"+ - "\u041b\u0001\u0000\u0000\u0000\u041b\u0419\u0001\u0000\u0000\u0000\u041b"+ - "\u041c\u0001\u0000\u0000\u0000\u041c\u041e\u0001\u0000\u0000\u0000\u041d"+ - "\u03fd\u0001\u0000\u0000\u0000\u041d\u0411\u0001\u0000\u0000\u0000\u041e"+ - "\u00c9\u0001\u0000\u0000\u0000\u041f\u0420\u0007\u0001\u0000\u0000\u0420"+ - "\u00cb\u0001\u0000\u0000\u0000\u0421\u0422\u0003\u00ceg\u0000\u0422\u0423"+ - "\u0005?\u0000\u0000\u0423\u0424\u0003\u00d0h\u0000\u0424\u00cd\u0001\u0000"+ - "\u0000\u0000\u0425\u0426\u0007\n\u0000\u0000\u0426\u00cf\u0001\u0000\u0000"+ - "\u0000\u0427\u042c\u0003\u00d6k\u0000\u0428\u0429\u0005D\u0000\u0000\u0429"+ - "\u042b\u0003\u00d6k\u0000\u042a\u0428\u0001\u0000\u0000\u0000\u042b\u042e"+ - "\u0001\u0000\u0000\u0000\u042c\u042a\u0001\u0000\u0000\u0000\u042c\u042d"+ - "\u0001\u0000\u0000\u0000\u042d\u0432\u0001\u0000\u0000\u0000\u042e\u042c"+ - "\u0001\u0000\u0000\u0000\u042f\u0432\u0005l\u0000\u0000\u0430\u0432\u0005"+ - "e\u0000\u0000\u0431\u0427\u0001\u0000\u0000\u0000\u0431\u042f\u0001\u0000"+ - "\u0000\u0000\u0431\u0430\u0001\u0000\u0000\u0000\u0432\u00d1\u0001\u0000"+ - "\u0000\u0000\u0433\u0434\u0007\u000b\u0000\u0000\u0434\u00d3\u0001\u0000"+ - "\u0000\u0000\u0435\u0437\u0003\u00d2i\u0000\u0436\u0435\u0001\u0000\u0000"+ - "\u0000\u0437\u0438\u0001\u0000\u0000\u0000\u0438\u0436\u0001\u0000\u0000"+ - "\u0000\u0438\u0439\u0001\u0000\u0000\u0000\u0439\u0443\u0001\u0000\u0000"+ - "\u0000\u043a\u043e\u0005i\u0000\u0000\u043b\u043d\u0003\u00d4j\u0000\u043c"+ - "\u043b\u0001\u0000\u0000\u0000\u043d\u0440\u0001\u0000\u0000\u0000\u043e"+ - "\u043c\u0001\u0000\u0000\u0000\u043e\u043f\u0001\u0000\u0000\u0000\u043f"+ - "\u0441\u0001\u0000\u0000\u0000\u0440\u043e\u0001\u0000\u0000\u0000\u0441"+ - "\u0443\u0005j\u0000\u0000\u0442\u0436\u0001\u0000\u0000\u0000\u0442\u043a"+ - "\u0001\u0000\u0000\u0000\u0443\u00d5\u0001\u0000\u0000\u0000\u0444\u0445"+ - "\u0003\u00d8l\u0000\u0445\u0446\u0005B\u0000\u0000\u0446\u0447\u0003\u00dc"+ - "n\u0000\u0447\u044e\u0001\u0000\u0000\u0000\u0448\u0449\u0003\u00dcn\u0000"+ - "\u0449\u044a\u0005A\u0000\u0000\u044a\u044b\u0003\u00dam\u0000\u044b\u044e"+ - "\u0001\u0000\u0000\u0000\u044c\u044e\u0003\u00deo\u0000\u044d\u0444\u0001"+ - "\u0000\u0000\u0000\u044d\u0448\u0001\u0000\u0000\u0000\u044d\u044c\u0001"+ - "\u0000\u0000\u0000\u044e\u00d7\u0001\u0000\u0000\u0000\u044f\u0450\u0007"+ - "\f\u0000\u0000\u0450\u00d9\u0001\u0000\u0000\u0000\u0451\u0452\u0007\f"+ - "\u0000\u0000\u0452\u00db\u0001\u0000\u0000\u0000\u0453\u0454\u0007\f\u0000"+ - "\u0000\u0454\u00dd\u0001\u0000\u0000\u0000\u0455\u0456\u0007\r\u0000\u0000"+ - "\u0456\u00df\u0001\u0000\u0000\u0000l\u00e3\u00f4\u0100\u011f\u012e\u0134"+ - "\u0147\u014b\u0150\u0158\u0160\u0165\u0168\u0178\u0180\u0184\u018b\u0191"+ - "\u0196\u019f\u01a6\u01ac\u01b5\u01bc\u01c4\u01cc\u01d0\u01d4\u01d9\u01dd"+ - "\u01e8\u01ed\u01f1\u01ff\u020a\u0210\u0217\u0220\u0229\u023d\u0245\u0248"+ - "\u024f\u025a\u0261\u0269\u0277\u0280\u028b\u0295\u029b\u029d\u02a1\u02a6"+ - "\u02b4\u02bb\u02dc\u02e0\u02ea\u02f3\u02fc\u0304\u0309\u0311\u0313\u0318"+ - "\u031f\u0326\u032f\u0336\u033f\u0344\u0349\u0353\u0359\u0361\u0363\u036e"+ - "\u0375\u0380\u0385\u0387\u038e\u0396\u0399\u03a3\u03b4\u03bf\u03ca\u03cf"+ - "\u03d5\u03d8\u03dd\u03ed\u03f2\u03fa\u0401\u0407\u040d\u0415\u041b\u041d"+ - "\u042c\u0431\u0438\u043e\u0442\u044d"; + "\u001c\u01b8\b\u001c\u0001\u001d\u0001\u001d\u0001\u001d\u0005\u001d\u01bd"+ + "\b\u001d\n\u001d\f\u001d\u01c0\t\u001d\u0001\u001e\u0001\u001e\u0001\u001e"+ + "\u0005\u001e\u01c5\b\u001e\n\u001e\f\u001e\u01c8\t\u001e\u0001\u001f\u0001"+ + "\u001f\u0001 \u0001 \u0001 \u0003 \u01cf\b \u0001!\u0001!\u0003!\u01d3"+ + "\b!\u0001\"\u0001\"\u0003\"\u01d7\b\"\u0001#\u0001#\u0001#\u0003#\u01dc"+ + "\b#\u0001$\u0001$\u0003$\u01e0\b$\u0001%\u0001%\u0001%\u0003%\u01e5\b"+ + "%\u0001&\u0001&\u0001&\u0001&\u0001\'\u0001\'\u0001\'\u0001\'\u0005\'"+ + "\u01ef\b\'\n\'\f\'\u01f2\t\'\u0001(\u0001(\u0003(\u01f6\b(\u0001(\u0001"+ + "(\u0003(\u01fa\b(\u0001)\u0001)\u0001)\u0001*\u0001*\u0001*\u0001+\u0001"+ + "+\u0001+\u0001+\u0005+\u0206\b+\n+\f+\u0209\t+\u0001,\u0001,\u0001,\u0001"+ + ",\u0001,\u0001,\u0001,\u0001,\u0003,\u0213\b,\u0001-\u0001-\u0001-\u0001"+ + "-\u0003-\u0219\b-\u0001.\u0001.\u0001.\u0005.\u021e\b.\n.\f.\u0221\t."+ + "\u0001/\u0001/\u0001/\u0001/\u00010\u00010\u00030\u0229\b0\u00011\u0001"+ + "1\u00011\u00011\u00011\u00051\u0230\b1\n1\f1\u0233\t1\u00012\u00012\u0001"+ + "2\u00013\u00013\u00013\u00014\u00014\u00014\u00014\u00015\u00015\u0001"+ + "5\u00016\u00016\u00016\u00016\u00036\u0246\b6\u00016\u00016\u00016\u0001"+ + "6\u00056\u024c\b6\n6\f6\u024f\t6\u00036\u0251\b6\u00017\u00017\u00018"+ + "\u00018\u00018\u00038\u0258\b8\u00018\u00018\u00019\u00019\u00019\u0001"+ + ":\u0001:\u0001:\u0001:\u0003:\u0263\b:\u0001:\u0001:\u0001:\u0001:\u0001"+ + ":\u0003:\u026a\b:\u0001;\u0001;\u0001;\u0001<\u0004<\u0270\b<\u000b<\f"+ + "<\u0271\u0001=\u0001=\u0001=\u0001=\u0001>\u0001>\u0001>\u0001>\u0001"+ + ">\u0001>\u0005>\u027e\b>\n>\f>\u0281\t>\u0001?\u0001?\u0001@\u0001@\u0001"+ + "@\u0001@\u0003@\u0289\b@\u0001@\u0001@\u0001@\u0001@\u0001@\u0001A\u0001"+ + "A\u0001A\u0001A\u0003A\u0294\bA\u0001A\u0001A\u0001A\u0001B\u0001B\u0001"+ + "B\u0001B\u0001B\u0003B\u029e\bB\u0001B\u0001B\u0001B\u0001B\u0003B\u02a4"+ + "\bB\u0003B\u02a6\bB\u0001C\u0001C\u0003C\u02aa\bC\u0001C\u0005C\u02ad"+ + "\bC\nC\fC\u02b0\tC\u0001D\u0001D\u0001D\u0001D\u0001D\u0001D\u0001D\u0001"+ + "D\u0001D\u0001D\u0001D\u0003D\u02bd\bD\u0001E\u0001E\u0001E\u0005E\u02c2"+ + "\bE\nE\fE\u02c5\tE\u0001F\u0001F\u0001G\u0001G\u0001H\u0001H\u0001H\u0001"+ + "H\u0001H\u0001I\u0001I\u0001I\u0001J\u0001J\u0001J\u0001J\u0001J\u0001"+ + "K\u0001K\u0001K\u0001K\u0001K\u0001L\u0001L\u0001L\u0001L\u0001M\u0001"+ + "M\u0001M\u0001M\u0003M\u02e5\bM\u0001N\u0001N\u0003N\u02e9\bN\u0001N\u0001"+ + "N\u0001N\u0001N\u0001N\u0001N\u0001O\u0001O\u0003O\u02f3\bO\u0001P\u0001"+ + "P\u0001P\u0001P\u0001P\u0001P\u0001P\u0003P\u02fc\bP\u0001P\u0001P\u0001"+ + "P\u0001P\u0001P\u0005P\u0303\bP\nP\fP\u0306\tP\u0001P\u0001P\u0001P\u0001"+ + "P\u0001P\u0003P\u030d\bP\u0001P\u0001P\u0001P\u0003P\u0312\bP\u0001P\u0001"+ + "P\u0001P\u0001P\u0001P\u0001P\u0005P\u031a\bP\nP\fP\u031d\tP\u0001Q\u0001"+ + "Q\u0003Q\u0321\bQ\u0001Q\u0001Q\u0001Q\u0001Q\u0001Q\u0003Q\u0328\bQ\u0001"+ + "Q\u0001Q\u0001Q\u0001Q\u0001Q\u0003Q\u032f\bQ\u0001Q\u0001Q\u0001Q\u0001"+ + "Q\u0001Q\u0005Q\u0336\bQ\nQ\fQ\u0339\tQ\u0001Q\u0001Q\u0001Q\u0001Q\u0003"+ + "Q\u033f\bQ\u0001Q\u0001Q\u0001Q\u0001Q\u0001Q\u0005Q\u0346\bQ\nQ\fQ\u0349"+ + "\tQ\u0001Q\u0001Q\u0003Q\u034d\bQ\u0001R\u0001R\u0001R\u0003R\u0352\b"+ + "R\u0001R\u0001R\u0001R\u0001S\u0001S\u0001S\u0001S\u0001S\u0003S\u035c"+ + "\bS\u0001T\u0001T\u0001T\u0001T\u0003T\u0362\bT\u0001T\u0001T\u0001T\u0001"+ + "T\u0001T\u0001T\u0005T\u036a\bT\nT\fT\u036d\tT\u0001U\u0001U\u0001U\u0001"+ + "U\u0001U\u0001U\u0001U\u0001U\u0003U\u0377\bU\u0001U\u0001U\u0001U\u0005"+ + "U\u037c\bU\nU\fU\u037f\tU\u0001V\u0001V\u0001V\u0001V\u0001V\u0001V\u0005"+ + "V\u0387\bV\nV\fV\u038a\tV\u0001V\u0001V\u0003V\u038e\bV\u0003V\u0390\b"+ + "V\u0001V\u0001V\u0001W\u0001W\u0001W\u0003W\u0397\bW\u0001X\u0001X\u0001"+ + "X\u0001X\u0005X\u039d\bX\nX\fX\u03a0\tX\u0003X\u03a2\bX\u0001X\u0001X"+ + "\u0001Y\u0001Y\u0001Y\u0001Y\u0001Z\u0001Z\u0003Z\u03ac\bZ\u0001[\u0001"+ + "[\u0001[\u0001[\u0001[\u0001[\u0001[\u0001[\u0001[\u0001[\u0001[\u0001"+ + "[\u0001[\u0005[\u03bb\b[\n[\f[\u03be\t[\u0001[\u0001[\u0001[\u0001[\u0001"+ + "[\u0001[\u0005[\u03c6\b[\n[\f[\u03c9\t[\u0001[\u0001[\u0001[\u0001[\u0001"+ + "[\u0001[\u0005[\u03d1\b[\n[\f[\u03d4\t[\u0001[\u0001[\u0003[\u03d8\b["+ + "\u0001\\\u0001\\\u0001]\u0001]\u0003]\u03de\b]\u0001^\u0003^\u03e1\b^"+ + "\u0001^\u0001^\u0001_\u0003_\u03e6\b_\u0001_\u0001_\u0001`\u0001`\u0001"+ + "a\u0001a\u0001b\u0001b\u0001b\u0001b\u0001b\u0001c\u0001c\u0001c\u0003"+ + "c\u03f6\bc\u0001c\u0001c\u0001c\u0003c\u03fb\bc\u0001d\u0001d\u0001d\u0001"+ + "d\u0005d\u0401\bd\nd\fd\u0404\td\u0001e\u0001e\u0005e\u0408\be\ne\fe\u040b"+ + "\te\u0001e\u0001e\u0001e\u0003e\u0410\be\u0001e\u0001e\u0004e\u0414\b"+ + "e\u000be\fe\u0415\u0001e\u0001e\u0001e\u0001e\u0005e\u041c\be\ne\fe\u041f"+ + "\te\u0001e\u0004e\u0422\be\u000be\fe\u0423\u0003e\u0426\be\u0001f\u0001"+ + "f\u0001g\u0001g\u0001g\u0001g\u0001h\u0001h\u0001i\u0001i\u0001i\u0005"+ + "i\u0433\bi\ni\fi\u0436\ti\u0001i\u0001i\u0003i\u043a\bi\u0001j\u0001j"+ + "\u0001k\u0004k\u043f\bk\u000bk\fk\u0440\u0001k\u0001k\u0005k\u0445\bk"+ + "\nk\fk\u0448\tk\u0001k\u0003k\u044b\bk\u0001l\u0001l\u0001l\u0001l\u0001"+ + "l\u0001l\u0001l\u0001l\u0001l\u0003l\u0456\bl\u0001m\u0001m\u0001n\u0001"+ + "n\u0001o\u0001o\u0001p\u0001p\u0001p\u0000\u0005\u0004|\u00a0\u00a8\u00aa"+ + "q\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016\u0018\u001a"+ + "\u001c\u001e \"$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082"+ + "\u0084\u0086\u0088\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098\u009a"+ + "\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0\u00b2"+ + "\u00b4\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8\u00ca"+ + "\u00cc\u00ce\u00d0\u00d2\u00d4\u00d6\u00d8\u00da\u00dc\u00de\u00e0\u0000"+ + "\u000e\u0002\u0000::qq\u0001\u0000kl\u0002\u0000>>EE\u0002\u0000HHKK\u0002"+ + "\u0000//::\u0001\u0000]^\u0001\u0000_a\u0002\u0000GGTT\u0002\u0000VVX"+ + "\\\u0002\u0000\u001d\u001d\u001f \u0003\u0000::eekl\b\u0000::??ABDDee"+ + "klqq\u009b\u009d\u0002\u0000kkqq\u0003\u0000::kkqq\u0491\u0000\u00e5\u0001"+ + "\u0000\u0000\u0000\u0002\u00eb\u0001\u0000\u0000\u0000\u0004\u00ee\u0001"+ + "\u0000\u0000\u0000\u0006\u0102\u0001\u0000\u0000\u0000\b\u0121\u0001\u0000"+ + "\u0000\u0000\n\u0123\u0001\u0000\u0000\u0000\f\u0126\u0001\u0000\u0000"+ + "\u0000\u000e\u0128\u0001\u0000\u0000\u0000\u0010\u012b\u0001\u0000\u0000"+ + "\u0000\u0012\u0136\u0001\u0000\u0000\u0000\u0014\u013a\u0001\u0000\u0000"+ + "\u0000\u0016\u013d\u0001\u0000\u0000\u0000\u0018\u0140\u0001\u0000\u0000"+ + "\u0000\u001a\u0144\u0001\u0000\u0000\u0000\u001c\u0152\u0001\u0000\u0000"+ + "\u0000\u001e\u0154\u0001\u0000\u0000\u0000 \u016a\u0001\u0000\u0000\u0000"+ + "\"\u016c\u0001\u0000\u0000\u0000$\u016e\u0001\u0000\u0000\u0000&\u0170"+ + "\u0001\u0000\u0000\u0000(\u0172\u0001\u0000\u0000\u0000*\u0174\u0001\u0000"+ + "\u0000\u0000,\u017d\u0001\u0000\u0000\u0000.\u0180\u0001\u0000\u0000\u0000"+ + "0\u0188\u0001\u0000\u0000\u00002\u0190\u0001\u0000\u0000\u00004\u01a1"+ + "\u0001\u0000\u0000\u00006\u01a3\u0001\u0000\u0000\u00008\u01b7\u0001\u0000"+ + "\u0000\u0000:\u01b9\u0001\u0000\u0000\u0000<\u01c1\u0001\u0000\u0000\u0000"+ + ">\u01c9\u0001\u0000\u0000\u0000@\u01ce\u0001\u0000\u0000\u0000B\u01d2"+ + "\u0001\u0000\u0000\u0000D\u01d6\u0001\u0000\u0000\u0000F\u01db\u0001\u0000"+ + "\u0000\u0000H\u01df\u0001\u0000\u0000\u0000J\u01e1\u0001\u0000\u0000\u0000"+ + "L\u01e6\u0001\u0000\u0000\u0000N\u01ea\u0001\u0000\u0000\u0000P\u01f3"+ + "\u0001\u0000\u0000\u0000R\u01fb\u0001\u0000\u0000\u0000T\u01fe\u0001\u0000"+ + "\u0000\u0000V\u0201\u0001\u0000\u0000\u0000X\u0212\u0001\u0000\u0000\u0000"+ + "Z\u0214\u0001\u0000\u0000\u0000\\\u021a\u0001\u0000\u0000\u0000^\u0222"+ + "\u0001\u0000\u0000\u0000`\u0228\u0001\u0000\u0000\u0000b\u022a\u0001\u0000"+ + "\u0000\u0000d\u0234\u0001\u0000\u0000\u0000f\u0237\u0001\u0000\u0000\u0000"+ + "h\u023a\u0001\u0000\u0000\u0000j\u023e\u0001\u0000\u0000\u0000l\u0241"+ + "\u0001\u0000\u0000\u0000n\u0252\u0001\u0000\u0000\u0000p\u0257\u0001\u0000"+ + "\u0000\u0000r\u025b\u0001\u0000\u0000\u0000t\u025e\u0001\u0000\u0000\u0000"+ + "v\u026b\u0001\u0000\u0000\u0000x\u026f\u0001\u0000\u0000\u0000z\u0273"+ + "\u0001\u0000\u0000\u0000|\u0277\u0001\u0000\u0000\u0000~\u0282\u0001\u0000"+ + "\u0000\u0000\u0080\u0284\u0001\u0000\u0000\u0000\u0082\u028f\u0001\u0000"+ + "\u0000\u0000\u0084\u02a5\u0001\u0000\u0000\u0000\u0086\u02a7\u0001\u0000"+ + "\u0000\u0000\u0088\u02bc\u0001\u0000\u0000\u0000\u008a\u02be\u0001\u0000"+ + "\u0000\u0000\u008c\u02c6\u0001\u0000\u0000\u0000\u008e\u02c8\u0001\u0000"+ + "\u0000\u0000\u0090\u02ca\u0001\u0000\u0000\u0000\u0092\u02cf\u0001\u0000"+ + "\u0000\u0000\u0094\u02d2\u0001\u0000\u0000\u0000\u0096\u02d7\u0001\u0000"+ + "\u0000\u0000\u0098\u02dc\u0001\u0000\u0000\u0000\u009a\u02e0\u0001\u0000"+ + "\u0000\u0000\u009c\u02e6\u0001\u0000\u0000\u0000\u009e\u02f2\u0001\u0000"+ + "\u0000\u0000\u00a0\u0311\u0001\u0000\u0000\u0000\u00a2\u034c\u0001\u0000"+ + "\u0000\u0000\u00a4\u034e\u0001\u0000\u0000\u0000\u00a6\u035b\u0001\u0000"+ + "\u0000\u0000\u00a8\u0361\u0001\u0000\u0000\u0000\u00aa\u0376\u0001\u0000"+ + "\u0000\u0000\u00ac\u0380\u0001\u0000\u0000\u0000\u00ae\u0396\u0001\u0000"+ + "\u0000\u0000\u00b0\u0398\u0001\u0000\u0000\u0000\u00b2\u03a5\u0001\u0000"+ + "\u0000\u0000\u00b4\u03ab\u0001\u0000\u0000\u0000\u00b6\u03d7\u0001\u0000"+ + "\u0000\u0000\u00b8\u03d9\u0001\u0000\u0000\u0000\u00ba\u03dd\u0001\u0000"+ + "\u0000\u0000\u00bc\u03e0\u0001\u0000\u0000\u0000\u00be\u03e5\u0001\u0000"+ + "\u0000\u0000\u00c0\u03e9\u0001\u0000\u0000\u0000\u00c2\u03eb\u0001\u0000"+ + "\u0000\u0000\u00c4\u03ed\u0001\u0000\u0000\u0000\u00c6\u03fa\u0001\u0000"+ + "\u0000\u0000\u00c8\u03fc\u0001\u0000\u0000\u0000\u00ca\u0425\u0001\u0000"+ + "\u0000\u0000\u00cc\u0427\u0001\u0000\u0000\u0000\u00ce\u0429\u0001\u0000"+ + "\u0000\u0000\u00d0\u042d\u0001\u0000\u0000\u0000\u00d2\u0439\u0001\u0000"+ + "\u0000\u0000\u00d4\u043b\u0001\u0000\u0000\u0000\u00d6\u044a\u0001\u0000"+ + "\u0000\u0000\u00d8\u0455\u0001\u0000\u0000\u0000\u00da\u0457\u0001\u0000"+ + "\u0000\u0000\u00dc\u0459\u0001\u0000\u0000\u0000\u00de\u045b\u0001\u0000"+ + "\u0000\u0000\u00e0\u045d\u0001\u0000\u0000\u0000\u00e2\u00e4\u0003\u0098"+ + "L\u0000\u00e3\u00e2\u0001\u0000\u0000\u0000\u00e4\u00e7\u0001\u0000\u0000"+ + "\u0000\u00e5\u00e3\u0001\u0000\u0000\u0000\u00e5\u00e6\u0001\u0000\u0000"+ + "\u0000\u00e6\u00e8\u0001\u0000\u0000\u0000\u00e7\u00e5\u0001\u0000\u0000"+ + "\u0000\u00e8\u00e9\u0003\u0002\u0001\u0000\u00e9\u00ea\u0005\u0000\u0000"+ + "\u0001\u00ea\u0001\u0001\u0000\u0000\u0000\u00eb\u00ec\u0003\u0004\u0002"+ + "\u0000\u00ec\u00ed\u0005\u0000\u0000\u0001\u00ed\u0003\u0001\u0000\u0000"+ + "\u0000\u00ee\u00ef\u0006\u0002\uffff\uffff\u0000\u00ef\u00f0\u0003\u0006"+ + "\u0003\u0000\u00f0\u00f6\u0001\u0000\u0000\u0000\u00f1\u00f2\n\u0001\u0000"+ + "\u0000\u00f2\u00f3\u00059\u0000\u0000\u00f3\u00f5\u0003\b\u0004\u0000"+ + "\u00f4\u00f1\u0001\u0000\u0000\u0000\u00f5\u00f8\u0001\u0000\u0000\u0000"+ + "\u00f6\u00f4\u0001\u0000\u0000\u0000\u00f6\u00f7\u0001\u0000\u0000\u0000"+ + "\u00f7\u0005\u0001\u0000\u0000\u0000\u00f8\u00f6\u0001\u0000\u0000\u0000"+ + "\u00f9\u0103\u0003\u0014\n\u0000\u00fa\u0103\u0003\u000e\u0007\u0000\u00fb"+ + "\u0103\u0003j5\u0000\u00fc\u0103\u0003\u0016\u000b\u0000\u00fd\u0103\u0003"+ + "\u00cae\u0000\u00fe\u00ff\u0004\u0003\u0001\u0000\u00ff\u0103\u0003f3"+ + "\u0000\u0100\u0101\u0004\u0003\u0002\u0000\u0101\u0103\u0003\u0018\f\u0000"+ + "\u0102\u00f9\u0001\u0000\u0000\u0000\u0102\u00fa\u0001\u0000\u0000\u0000"+ + "\u0102\u00fb\u0001\u0000\u0000\u0000\u0102\u00fc\u0001\u0000\u0000\u0000"+ + "\u0102\u00fd\u0001\u0000\u0000\u0000\u0102\u00fe\u0001\u0000\u0000\u0000"+ + "\u0102\u0100\u0001\u0000\u0000\u0000\u0103\u0007\u0001\u0000\u0000\u0000"+ + "\u0104\u0122\u0003,\u0016\u0000\u0105\u0122\u0003\n\u0005\u0000\u0106"+ + "\u0122\u0003R)\u0000\u0107\u0122\u0003J%\u0000\u0108\u0122\u0003.\u0017"+ + "\u0000\u0109\u0122\u0003N\'\u0000\u010a\u0122\u0003T*\u0000\u010b\u0122"+ + "\u0003V+\u0000\u010c\u0122\u0003Z-\u0000\u010d\u0122\u0003b1\u0000\u010e"+ + "\u0122\u0003l6\u0000\u010f\u0122\u0003d2\u0000\u0110\u0122\u0003\u00c4"+ + "b\u0000\u0111\u0122\u0003t:\u0000\u0112\u0122\u0003\u0082A\u0000\u0113"+ + "\u0122\u0003r9\u0000\u0114\u0122\u0003v;\u0000\u0115\u0122\u0003\u0080"+ + "@\u0000\u0116\u0122\u0003\u0084B\u0000\u0117\u0122\u0003\u0086C\u0000"+ + "\u0118\u0122\u0003\u0094J\u0000\u0119\u0122\u0003\u008cF\u0000\u011a\u0122"+ + "\u0003\u0096K\u0000\u011b\u0122\u0003\u008eG\u0000\u011c\u0122\u0003\u009c"+ + "N\u0000\u011d\u011e\u0004\u0004\u0003\u0000\u011e\u0122\u0003\u0090H\u0000"+ + "\u011f\u0120\u0004\u0004\u0004\u0000\u0120\u0122\u0003\u0092I\u0000\u0121"+ + "\u0104\u0001\u0000\u0000\u0000\u0121\u0105\u0001\u0000\u0000\u0000\u0121"+ + "\u0106\u0001\u0000\u0000\u0000\u0121\u0107\u0001\u0000\u0000\u0000\u0121"+ + "\u0108\u0001\u0000\u0000\u0000\u0121\u0109\u0001\u0000\u0000\u0000\u0121"+ + "\u010a\u0001\u0000\u0000\u0000\u0121\u010b\u0001\u0000\u0000\u0000\u0121"+ + "\u010c\u0001\u0000\u0000\u0000\u0121\u010d\u0001\u0000\u0000\u0000\u0121"+ + "\u010e\u0001\u0000\u0000\u0000\u0121\u010f\u0001\u0000\u0000\u0000\u0121"+ + "\u0110\u0001\u0000\u0000\u0000\u0121\u0111\u0001\u0000\u0000\u0000\u0121"+ + "\u0112\u0001\u0000\u0000\u0000\u0121\u0113\u0001\u0000\u0000\u0000\u0121"+ + "\u0114\u0001\u0000\u0000\u0000\u0121\u0115\u0001\u0000\u0000\u0000\u0121"+ + "\u0116\u0001\u0000\u0000\u0000\u0121\u0117\u0001\u0000\u0000\u0000\u0121"+ + "\u0118\u0001\u0000\u0000\u0000\u0121\u0119\u0001\u0000\u0000\u0000\u0121"+ + "\u011a\u0001\u0000\u0000\u0000\u0121\u011b\u0001\u0000\u0000\u0000\u0121"+ + "\u011c\u0001\u0000\u0000\u0000\u0121\u011d\u0001\u0000\u0000\u0000\u0121"+ + "\u011f\u0001\u0000\u0000\u0000\u0122\t\u0001\u0000\u0000\u0000\u0123\u0124"+ + "\u0005\u0011\u0000\u0000\u0124\u0125\u0003\u00a0P\u0000\u0125\u000b\u0001"+ + "\u0000\u0000\u0000\u0126\u0127\u0003>\u001f\u0000\u0127\r\u0001\u0000"+ + "\u0000\u0000\u0128\u0129\u0005\r\u0000\u0000\u0129\u012a\u0003\u0010\b"+ + "\u0000\u012a\u000f\u0001\u0000\u0000\u0000\u012b\u0130\u0003\u0012\t\u0000"+ + "\u012c\u012d\u0005D\u0000\u0000\u012d\u012f\u0003\u0012\t\u0000\u012e"+ + "\u012c\u0001\u0000\u0000\u0000\u012f\u0132\u0001\u0000\u0000\u0000\u0130"+ + "\u012e\u0001\u0000\u0000\u0000\u0130\u0131\u0001\u0000\u0000\u0000\u0131"+ + "\u0011\u0001\u0000\u0000\u0000\u0132\u0130\u0001\u0000\u0000\u0000\u0133"+ + "\u0134\u00034\u001a\u0000\u0134\u0135\u0005?\u0000\u0000\u0135\u0137\u0001"+ + "\u0000\u0000\u0000\u0136\u0133\u0001\u0000\u0000\u0000\u0136\u0137\u0001"+ + "\u0000\u0000\u0000\u0137\u0138\u0001\u0000\u0000\u0000\u0138\u0139\u0003"+ + "\u00a0P\u0000\u0139\u0013\u0001\u0000\u0000\u0000\u013a\u013b\u0005\u0016"+ + "\u0000\u0000\u013b\u013c\u0003\u001a\r\u0000\u013c\u0015\u0001\u0000\u0000"+ + "\u0000\u013d\u013e\u0005\u0017\u0000\u0000\u013e\u013f\u0003\u001a\r\u0000"+ + "\u013f\u0017\u0001\u0000\u0000\u0000\u0140\u0141\u0005\u0018\u0000\u0000"+ + "\u0141\u0142\u0003H$\u0000\u0142\u0143\u0003`0\u0000\u0143\u0019\u0001"+ + "\u0000\u0000\u0000\u0144\u0149\u0003\u001c\u000e\u0000\u0145\u0146\u0005"+ + "D\u0000\u0000\u0146\u0148\u0003\u001c\u000e\u0000\u0147\u0145\u0001\u0000"+ + "\u0000\u0000\u0148\u014b\u0001\u0000\u0000\u0000\u0149\u0147\u0001\u0000"+ + "\u0000\u0000\u0149\u014a\u0001\u0000\u0000\u0000\u014a\u014d\u0001\u0000"+ + "\u0000\u0000\u014b\u0149\u0001\u0000\u0000\u0000\u014c\u014e\u0003*\u0015"+ + "\u0000\u014d\u014c\u0001\u0000\u0000\u0000\u014d\u014e\u0001\u0000\u0000"+ + "\u0000\u014e\u001b\u0001\u0000\u0000\u0000\u014f\u0153\u0003 \u0010\u0000"+ + "\u0150\u0151\u0004\u000e\u0005\u0000\u0151\u0153\u0003\u001e\u000f\u0000"+ + "\u0152\u014f\u0001\u0000\u0000\u0000\u0152\u0150\u0001\u0000\u0000\u0000"+ + "\u0153\u001d\u0001\u0000\u0000\u0000\u0154\u0155\u0005i\u0000\u0000\u0155"+ + "\u015a\u0003\u0014\n\u0000\u0156\u0157\u00059\u0000\u0000\u0157\u0159"+ + "\u0003\b\u0004\u0000\u0158\u0156\u0001\u0000\u0000\u0000\u0159\u015c\u0001"+ + "\u0000\u0000\u0000\u015a\u0158\u0001\u0000\u0000\u0000\u015a\u015b\u0001"+ + "\u0000\u0000\u0000\u015b\u015d\u0001\u0000\u0000\u0000\u015c\u015a\u0001"+ + "\u0000\u0000\u0000\u015d\u015e\u0005j\u0000\u0000\u015e\u001f\u0001\u0000"+ + "\u0000\u0000\u015f\u0160\u0003\"\u0011\u0000\u0160\u0161\u0005B\u0000"+ + "\u0000\u0161\u0163\u0001\u0000\u0000\u0000\u0162\u015f\u0001\u0000\u0000"+ + "\u0000\u0162\u0163\u0001\u0000\u0000\u0000\u0163\u0164\u0001\u0000\u0000"+ + "\u0000\u0164\u0167\u0003&\u0013\u0000\u0165\u0166\u0005A\u0000\u0000\u0166"+ + "\u0168\u0003$\u0012\u0000\u0167\u0165\u0001\u0000\u0000\u0000\u0167\u0168"+ + "\u0001\u0000\u0000\u0000\u0168\u016b\u0001\u0000\u0000\u0000\u0169\u016b"+ + "\u0003(\u0014\u0000\u016a\u0162\u0001\u0000\u0000\u0000\u016a\u0169\u0001"+ + "\u0000\u0000\u0000\u016b!\u0001\u0000\u0000\u0000\u016c\u016d\u0005q\u0000"+ + "\u0000\u016d#\u0001\u0000\u0000\u0000\u016e\u016f\u0005q\u0000\u0000\u016f"+ + "%\u0001\u0000\u0000\u0000\u0170\u0171\u0005q\u0000\u0000\u0171\'\u0001"+ + "\u0000\u0000\u0000\u0172\u0173\u0007\u0000\u0000\u0000\u0173)\u0001\u0000"+ + "\u0000\u0000\u0174\u0175\u0005p\u0000\u0000\u0175\u017a\u0005q\u0000\u0000"+ + "\u0176\u0177\u0005D\u0000\u0000\u0177\u0179\u0005q\u0000\u0000\u0178\u0176"+ + "\u0001\u0000\u0000\u0000\u0179\u017c\u0001\u0000\u0000\u0000\u017a\u0178"+ + "\u0001\u0000\u0000\u0000\u017a\u017b\u0001\u0000\u0000\u0000\u017b+\u0001"+ + "\u0000\u0000\u0000\u017c\u017a\u0001\u0000\u0000\u0000\u017d\u017e\u0005"+ + "\t\u0000\u0000\u017e\u017f\u0003\u0010\b\u0000\u017f-\u0001\u0000\u0000"+ + "\u0000\u0180\u0182\u0005\u0010\u0000\u0000\u0181\u0183\u00030\u0018\u0000"+ + "\u0182\u0181\u0001\u0000\u0000\u0000\u0182\u0183\u0001\u0000\u0000\u0000"+ + "\u0183\u0186\u0001\u0000\u0000\u0000\u0184\u0185\u0005@\u0000\u0000\u0185"+ + "\u0187\u0003\u0010\b\u0000\u0186\u0184\u0001\u0000\u0000\u0000\u0186\u0187"+ + "\u0001\u0000\u0000\u0000\u0187/\u0001\u0000\u0000\u0000\u0188\u018d\u0003"+ + "2\u0019\u0000\u0189\u018a\u0005D\u0000\u0000\u018a\u018c\u00032\u0019"+ + "\u0000\u018b\u0189\u0001\u0000\u0000\u0000\u018c\u018f\u0001\u0000\u0000"+ + "\u0000\u018d\u018b\u0001\u0000\u0000\u0000\u018d\u018e\u0001\u0000\u0000"+ + "\u0000\u018e1\u0001\u0000\u0000\u0000\u018f\u018d\u0001\u0000\u0000\u0000"+ + "\u0190\u0193\u0003\u0012\t\u0000\u0191\u0192\u0005\u0011\u0000\u0000\u0192"+ + "\u0194\u0003\u00a0P\u0000\u0193\u0191\u0001\u0000\u0000\u0000\u0193\u0194"+ + "\u0001\u0000\u0000\u0000\u01943\u0001\u0000\u0000\u0000\u0195\u0196\u0004"+ + "\u001a\u0006\u0000\u0196\u0198\u0005g\u0000\u0000\u0197\u0199\u0005k\u0000"+ + "\u0000\u0198\u0197\u0001\u0000\u0000\u0000\u0198\u0199\u0001\u0000\u0000"+ + "\u0000\u0199\u019a\u0001\u0000\u0000\u0000\u019a\u019b\u0005h\u0000\u0000"+ + "\u019b\u019c\u0005F\u0000\u0000\u019c\u019d\u0005g\u0000\u0000\u019d\u019e"+ + "\u00036\u001b\u0000\u019e\u019f\u0005h\u0000\u0000\u019f\u01a2\u0001\u0000"+ + "\u0000\u0000\u01a0\u01a2\u00036\u001b\u0000\u01a1\u0195\u0001\u0000\u0000"+ + "\u0000\u01a1\u01a0\u0001\u0000\u0000\u0000\u01a25\u0001\u0000\u0000\u0000"+ + "\u01a3\u01a8\u0003F#\u0000\u01a4\u01a5\u0005F\u0000\u0000\u01a5\u01a7"+ + "\u0003F#\u0000\u01a6\u01a4\u0001\u0000\u0000\u0000\u01a7\u01aa\u0001\u0000"+ + "\u0000\u0000\u01a8\u01a6\u0001\u0000\u0000\u0000\u01a8\u01a9\u0001\u0000"+ + "\u0000\u0000\u01a97\u0001\u0000\u0000\u0000\u01aa\u01a8\u0001\u0000\u0000"+ + "\u0000\u01ab\u01ac\u0004\u001c\u0007\u0000\u01ac\u01ae\u0005g\u0000\u0000"+ + "\u01ad\u01af\u0005\u0094\u0000\u0000\u01ae\u01ad\u0001\u0000\u0000\u0000"+ + "\u01ae\u01af\u0001\u0000\u0000\u0000\u01af\u01b0\u0001\u0000\u0000\u0000"+ + "\u01b0\u01b1\u0005h\u0000\u0000\u01b1\u01b2\u0005F\u0000\u0000\u01b2\u01b3"+ + "\u0005g\u0000\u0000\u01b3\u01b4\u0003:\u001d\u0000\u01b4\u01b5\u0005h"+ + "\u0000\u0000\u01b5\u01b8\u0001\u0000\u0000\u0000\u01b6\u01b8\u0003:\u001d"+ + "\u0000\u01b7\u01ab\u0001\u0000\u0000\u0000\u01b7\u01b6\u0001\u0000\u0000"+ + "\u0000\u01b89\u0001\u0000\u0000\u0000\u01b9\u01be\u0003@ \u0000\u01ba"+ + "\u01bb\u0005F\u0000\u0000\u01bb\u01bd\u0003@ \u0000\u01bc\u01ba\u0001"+ + "\u0000\u0000\u0000\u01bd\u01c0\u0001\u0000\u0000\u0000\u01be\u01bc\u0001"+ + "\u0000\u0000\u0000\u01be\u01bf\u0001\u0000\u0000\u0000\u01bf;\u0001\u0000"+ + "\u0000\u0000\u01c0\u01be\u0001\u0000\u0000\u0000\u01c1\u01c6\u00038\u001c"+ + "\u0000\u01c2\u01c3\u0005D\u0000\u0000\u01c3\u01c5\u00038\u001c\u0000\u01c4"+ + "\u01c2\u0001\u0000\u0000\u0000\u01c5\u01c8\u0001\u0000\u0000\u0000\u01c6"+ + "\u01c4\u0001\u0000\u0000\u0000\u01c6\u01c7\u0001\u0000\u0000\u0000\u01c7"+ + "=\u0001\u0000\u0000\u0000\u01c8\u01c6\u0001\u0000\u0000\u0000\u01c9\u01ca"+ + "\u0007\u0001\u0000\u0000\u01ca?\u0001\u0000\u0000\u0000\u01cb\u01cf\u0005"+ + "\u0094\u0000\u0000\u01cc\u01cf\u0003B!\u0000\u01cd\u01cf\u0003D\"\u0000"+ + "\u01ce\u01cb\u0001\u0000\u0000\u0000\u01ce\u01cc\u0001\u0000\u0000\u0000"+ + "\u01ce\u01cd\u0001\u0000\u0000\u0000\u01cfA\u0001\u0000\u0000\u0000\u01d0"+ + "\u01d3\u0005R\u0000\u0000\u01d1\u01d3\u0005e\u0000\u0000\u01d2\u01d0\u0001"+ + "\u0000\u0000\u0000\u01d2\u01d1\u0001\u0000\u0000\u0000\u01d3C\u0001\u0000"+ + "\u0000\u0000\u01d4\u01d7\u0005d\u0000\u0000\u01d5\u01d7\u0005f\u0000\u0000"+ + "\u01d6\u01d4\u0001\u0000\u0000\u0000\u01d6\u01d5\u0001\u0000\u0000\u0000"+ + "\u01d7E\u0001\u0000\u0000\u0000\u01d8\u01dc\u0003>\u001f\u0000\u01d9\u01dc"+ + "\u0003B!\u0000\u01da\u01dc\u0003D\"\u0000\u01db\u01d8\u0001\u0000\u0000"+ + "\u0000\u01db\u01d9\u0001\u0000\u0000\u0000\u01db\u01da\u0001\u0000\u0000"+ + "\u0000\u01dcG\u0001\u0000\u0000\u0000\u01dd\u01e0\u0003\u00c0`\u0000\u01de"+ + "\u01e0\u0003B!\u0000\u01df\u01dd\u0001\u0000\u0000\u0000\u01df\u01de\u0001"+ + "\u0000\u0000\u0000\u01e0I\u0001\u0000\u0000\u0000\u01e1\u01e2\u0005\u000b"+ + "\u0000\u0000\u01e2\u01e4\u0003\u00b6[\u0000\u01e3\u01e5\u0003L&\u0000"+ + "\u01e4\u01e3\u0001\u0000\u0000\u0000\u01e4\u01e5\u0001\u0000\u0000\u0000"+ + "\u01e5K\u0001\u0000\u0000\u0000\u01e6\u01e7\u0004&\b\u0000\u01e7\u01e8"+ + "\u0005@\u0000\u0000\u01e8\u01e9\u0003\u0010\b\u0000\u01e9M\u0001\u0000"+ + "\u0000\u0000\u01ea\u01eb\u0005\u000f\u0000\u0000\u01eb\u01f0\u0003P(\u0000"+ + "\u01ec\u01ed\u0005D\u0000\u0000\u01ed\u01ef\u0003P(\u0000\u01ee\u01ec"+ + "\u0001\u0000\u0000\u0000\u01ef\u01f2\u0001\u0000\u0000\u0000\u01f0\u01ee"+ + "\u0001\u0000\u0000\u0000\u01f0\u01f1\u0001\u0000\u0000\u0000\u01f1O\u0001"+ + "\u0000\u0000\u0000\u01f2\u01f0\u0001\u0000\u0000\u0000\u01f3\u01f5\u0003"+ + "\u00a0P\u0000\u01f4\u01f6\u0007\u0002\u0000\u0000\u01f5\u01f4\u0001\u0000"+ + "\u0000\u0000\u01f5\u01f6\u0001\u0000\u0000\u0000\u01f6\u01f9\u0001\u0000"+ + "\u0000\u0000\u01f7\u01f8\u0005O\u0000\u0000\u01f8\u01fa\u0007\u0003\u0000"+ + "\u0000\u01f9\u01f7\u0001\u0000\u0000\u0000\u01f9\u01fa\u0001\u0000\u0000"+ + "\u0000\u01faQ\u0001\u0000\u0000\u0000\u01fb\u01fc\u0005%\u0000\u0000\u01fc"+ + "\u01fd\u0003<\u001e\u0000\u01fdS\u0001\u0000\u0000\u0000\u01fe\u01ff\u0005"+ + "$\u0000\u0000\u01ff\u0200\u0003<\u001e\u0000\u0200U\u0001\u0000\u0000"+ + "\u0000\u0201\u0202\u0005(\u0000\u0000\u0202\u0207\u0003X,\u0000\u0203"+ + "\u0204\u0005D\u0000\u0000\u0204\u0206\u0003X,\u0000\u0205\u0203\u0001"+ + "\u0000\u0000\u0000\u0206\u0209\u0001\u0000\u0000\u0000\u0207\u0205\u0001"+ + "\u0000\u0000\u0000\u0207\u0208\u0001\u0000\u0000\u0000\u0208W\u0001\u0000"+ + "\u0000\u0000\u0209\u0207\u0001\u0000\u0000\u0000\u020a\u020b\u00038\u001c"+ + "\u0000\u020b\u020c\u0005\u009e\u0000\u0000\u020c\u020d\u00038\u001c\u0000"+ + "\u020d\u0213\u0001\u0000\u0000\u0000\u020e\u020f\u00038\u001c\u0000\u020f"+ + "\u0210\u0005?\u0000\u0000\u0210\u0211\u00038\u001c\u0000\u0211\u0213\u0001"+ + "\u0000\u0000\u0000\u0212\u020a\u0001\u0000\u0000\u0000\u0212\u020e\u0001"+ + "\u0000\u0000\u0000\u0213Y\u0001\u0000\u0000\u0000\u0214\u0215\u0005\b"+ + "\u0000\u0000\u0215\u0216\u0003\u00aaU\u0000\u0216\u0218\u0003\u00c0`\u0000"+ + "\u0217\u0219\u0003\\.\u0000\u0218\u0217\u0001\u0000\u0000\u0000\u0218"+ + "\u0219\u0001\u0000\u0000\u0000\u0219[\u0001\u0000\u0000\u0000\u021a\u021f"+ + "\u0003^/\u0000\u021b\u021c\u0005D\u0000\u0000\u021c\u021e\u0003^/\u0000"+ + "\u021d\u021b\u0001\u0000\u0000\u0000\u021e\u0221\u0001\u0000\u0000\u0000"+ + "\u021f\u021d\u0001\u0000\u0000\u0000\u021f\u0220\u0001\u0000\u0000\u0000"+ + "\u0220]\u0001\u0000\u0000\u0000\u0221\u021f\u0001\u0000\u0000\u0000\u0222"+ + "\u0223\u0003>\u001f\u0000\u0223\u0224\u0005?\u0000\u0000\u0224\u0225\u0003"+ + "\u00b6[\u0000\u0225_\u0001\u0000\u0000\u0000\u0226\u0227\u0005U\u0000"+ + "\u0000\u0227\u0229\u0003\u00b0X\u0000\u0228\u0226\u0001\u0000\u0000\u0000"+ + "\u0228\u0229\u0001\u0000\u0000\u0000\u0229a\u0001\u0000\u0000\u0000\u022a"+ + "\u022b\u0005\n\u0000\u0000\u022b\u022c\u0003\u00aaU\u0000\u022c\u0231"+ + "\u0003\u00c0`\u0000\u022d\u022e\u0005D\u0000\u0000\u022e\u0230\u0003\u00c0"+ + "`\u0000\u022f\u022d\u0001\u0000\u0000\u0000\u0230\u0233\u0001\u0000\u0000"+ + "\u0000\u0231\u022f\u0001\u0000\u0000\u0000\u0231\u0232\u0001\u0000\u0000"+ + "\u0000\u0232c\u0001\u0000\u0000\u0000\u0233\u0231\u0001\u0000\u0000\u0000"+ + "\u0234\u0235\u0005#\u0000\u0000\u0235\u0236\u00034\u001a\u0000\u0236e"+ + "\u0001\u0000\u0000\u0000\u0237\u0238\u0005\u0006\u0000\u0000\u0238\u0239"+ + "\u0003h4\u0000\u0239g\u0001\u0000\u0000\u0000\u023a\u023b\u0005i\u0000"+ + "\u0000\u023b\u023c\u0003\u0004\u0002\u0000\u023c\u023d\u0005j\u0000\u0000"+ + "\u023di\u0001\u0000\u0000\u0000\u023e\u023f\u0005*\u0000\u0000\u023f\u0240"+ + "\u0005\u00a5\u0000\u0000\u0240k\u0001\u0000\u0000\u0000\u0241\u0242\u0005"+ + "\u0005\u0000\u0000\u0242\u0245\u0003n7\u0000\u0243\u0244\u0005P\u0000"+ + "\u0000\u0244\u0246\u00038\u001c\u0000\u0245\u0243\u0001\u0000\u0000\u0000"+ + "\u0245\u0246\u0001\u0000\u0000\u0000\u0246\u0250\u0001\u0000\u0000\u0000"+ + "\u0247\u0248\u0005U\u0000\u0000\u0248\u024d\u0003p8\u0000\u0249\u024a"+ + "\u0005D\u0000\u0000\u024a\u024c\u0003p8\u0000\u024b\u0249\u0001\u0000"+ + "\u0000\u0000\u024c\u024f\u0001\u0000\u0000\u0000\u024d\u024b\u0001\u0000"+ + "\u0000\u0000\u024d\u024e\u0001\u0000\u0000\u0000\u024e\u0251\u0001\u0000"+ + "\u0000\u0000\u024f\u024d\u0001\u0000\u0000\u0000\u0250\u0247\u0001\u0000"+ + "\u0000\u0000\u0250\u0251\u0001\u0000\u0000\u0000\u0251m\u0001\u0000\u0000"+ + "\u0000\u0252\u0253\u0007\u0004\u0000\u0000\u0253o\u0001\u0000\u0000\u0000"+ + "\u0254\u0255\u00038\u001c\u0000\u0255\u0256\u0005?\u0000\u0000\u0256\u0258"+ + "\u0001\u0000\u0000\u0000\u0257\u0254\u0001\u0000\u0000\u0000\u0257\u0258"+ + "\u0001\u0000\u0000\u0000\u0258\u0259\u0001\u0000\u0000\u0000\u0259\u025a"+ + "\u00038\u001c\u0000\u025aq\u0001\u0000\u0000\u0000\u025b\u025c\u0005\u000e"+ + "\u0000\u0000\u025c\u025d\u0003\u00b6[\u0000\u025ds\u0001\u0000\u0000\u0000"+ + "\u025e\u025f\u0005\u0004\u0000\u0000\u025f\u0262\u00034\u001a\u0000\u0260"+ + "\u0261\u0005P\u0000\u0000\u0261\u0263\u00034\u001a\u0000\u0262\u0260\u0001"+ + "\u0000\u0000\u0000\u0262\u0263\u0001\u0000\u0000\u0000\u0263\u0269\u0001"+ + "\u0000\u0000\u0000\u0264\u0265\u0005\u009e\u0000\u0000\u0265\u0266\u0003"+ + "4\u001a\u0000\u0266\u0267\u0005D\u0000\u0000\u0267\u0268\u00034\u001a"+ + "\u0000\u0268\u026a\u0001\u0000\u0000\u0000\u0269\u0264\u0001\u0000\u0000"+ + "\u0000\u0269\u026a\u0001\u0000\u0000\u0000\u026au\u0001\u0000\u0000\u0000"+ + "\u026b\u026c\u0005\u0019\u0000\u0000\u026c\u026d\u0003x<\u0000\u026dw"+ + "\u0001\u0000\u0000\u0000\u026e\u0270\u0003z=\u0000\u026f\u026e\u0001\u0000"+ + "\u0000\u0000\u0270\u0271\u0001\u0000\u0000\u0000\u0271\u026f\u0001\u0000"+ + "\u0000\u0000\u0271\u0272\u0001\u0000\u0000\u0000\u0272y\u0001\u0000\u0000"+ + "\u0000\u0273\u0274\u0005i\u0000\u0000\u0274\u0275\u0003|>\u0000\u0275"+ + "\u0276\u0005j\u0000\u0000\u0276{\u0001\u0000\u0000\u0000\u0277\u0278\u0006"+ + ">\uffff\uffff\u0000\u0278\u0279\u0003~?\u0000\u0279\u027f\u0001\u0000"+ + "\u0000\u0000\u027a\u027b\n\u0001\u0000\u0000\u027b\u027c\u00059\u0000"+ + "\u0000\u027c\u027e\u0003~?\u0000\u027d\u027a\u0001\u0000\u0000\u0000\u027e"+ + "\u0281\u0001\u0000\u0000\u0000\u027f\u027d\u0001\u0000\u0000\u0000\u027f"+ + "\u0280\u0001\u0000\u0000\u0000\u0280}\u0001\u0000\u0000\u0000\u0281\u027f"+ + "\u0001\u0000\u0000\u0000\u0282\u0283\u0003\b\u0004\u0000\u0283\u007f\u0001"+ + "\u0000\u0000\u0000\u0284\u0288\u0005\f\u0000\u0000\u0285\u0286\u00034"+ + "\u001a\u0000\u0286\u0287\u0005?\u0000\u0000\u0287\u0289\u0001\u0000\u0000"+ + "\u0000\u0288\u0285\u0001\u0000\u0000\u0000\u0288\u0289\u0001\u0000\u0000"+ + "\u0000\u0289\u028a\u0001\u0000\u0000\u0000\u028a\u028b\u0003\u00b6[\u0000"+ + "\u028b\u028c\u0005P\u0000\u0000\u028c\u028d\u0003\u0010\b\u0000\u028d"+ + "\u028e\u0003`0\u0000\u028e\u0081\u0001\u0000\u0000\u0000\u028f\u0293\u0005"+ + "\u0007\u0000\u0000\u0290\u0291\u00034\u001a\u0000\u0291\u0292\u0005?\u0000"+ + "\u0000\u0292\u0294\u0001\u0000\u0000\u0000\u0293\u0290\u0001\u0000\u0000"+ + "\u0000\u0293\u0294\u0001\u0000\u0000\u0000\u0294\u0295\u0001\u0000\u0000"+ + "\u0000\u0295\u0296\u0003\u00aaU\u0000\u0296\u0297\u0003`0\u0000\u0297"+ + "\u0083\u0001\u0000\u0000\u0000\u0298\u0299\u0005\u001b\u0000\u0000\u0299"+ + "\u029a\u0005~\u0000\u0000\u029a\u029d\u00030\u0018\u0000\u029b\u029c\u0005"+ + "@\u0000\u0000\u029c\u029e\u0003\u0010\b\u0000\u029d\u029b\u0001\u0000"+ + "\u0000\u0000\u029d\u029e\u0001\u0000\u0000\u0000\u029e\u02a6\u0001\u0000"+ + "\u0000\u0000\u029f\u02a0\u0005\u001c\u0000\u0000\u02a0\u02a3\u00030\u0018"+ + "\u0000\u02a1\u02a2\u0005@\u0000\u0000\u02a2\u02a4\u0003\u0010\b\u0000"+ + "\u02a3\u02a1\u0001\u0000\u0000\u0000\u02a3\u02a4\u0001\u0000\u0000\u0000"+ + "\u02a4\u02a6\u0001\u0000\u0000\u0000\u02a5\u0298\u0001\u0000\u0000\u0000"+ + "\u02a5\u029f\u0001\u0000\u0000\u0000\u02a6\u0085\u0001\u0000\u0000\u0000"+ + "\u02a7\u02a9\u0005\u001a\u0000\u0000\u02a8\u02aa\u0003>\u001f\u0000\u02a9"+ + "\u02a8\u0001\u0000\u0000\u0000\u02a9\u02aa\u0001\u0000\u0000\u0000\u02aa"+ + "\u02ae\u0001\u0000\u0000\u0000\u02ab\u02ad\u0003\u0088D\u0000\u02ac\u02ab"+ + "\u0001\u0000\u0000\u0000\u02ad\u02b0\u0001\u0000\u0000\u0000\u02ae\u02ac"+ + "\u0001\u0000\u0000\u0000\u02ae\u02af\u0001\u0000\u0000\u0000\u02af\u0087"+ + "\u0001\u0000\u0000\u0000\u02b0\u02ae\u0001\u0000\u0000\u0000\u02b1\u02b2"+ + "\u0005y\u0000\u0000\u02b2\u02b3\u0005@\u0000\u0000\u02b3\u02bd\u00034"+ + "\u001a\u0000\u02b4\u02b5\u0005z\u0000\u0000\u02b5\u02b6\u0005@\u0000\u0000"+ + "\u02b6\u02bd\u0003\u008aE\u0000\u02b7\u02b8\u0005x\u0000\u0000\u02b8\u02b9"+ + "\u0005@\u0000\u0000\u02b9\u02bd\u00034\u001a\u0000\u02ba\u02bb\u0005U"+ + "\u0000\u0000\u02bb\u02bd\u0003\u00b0X\u0000\u02bc\u02b1\u0001\u0000\u0000"+ + "\u0000\u02bc\u02b4\u0001\u0000\u0000\u0000\u02bc\u02b7\u0001\u0000\u0000"+ + "\u0000\u02bc\u02ba\u0001\u0000\u0000\u0000\u02bd\u0089\u0001\u0000\u0000"+ + "\u0000\u02be\u02c3\u00034\u001a\u0000\u02bf\u02c0\u0005D\u0000\u0000\u02c0"+ + "\u02c2\u00034\u001a\u0000\u02c1\u02bf\u0001\u0000\u0000\u0000\u02c2\u02c5"+ + "\u0001\u0000\u0000\u0000\u02c3\u02c1\u0001\u0000\u0000\u0000\u02c3\u02c4"+ + "\u0001\u0000\u0000\u0000\u02c4\u008b\u0001\u0000\u0000\u0000\u02c5\u02c3"+ + "\u0001\u0000\u0000\u0000\u02c6\u02c7\u0005\u0013\u0000\u0000\u02c7\u008d"+ + "\u0001\u0000\u0000\u0000\u02c8\u02c9\u0005\u0015\u0000\u0000\u02c9\u008f"+ + "\u0001\u0000\u0000\u0000\u02ca\u02cb\u0005!\u0000\u0000\u02cb\u02cc\u0003"+ + " \u0010\u0000\u02cc\u02cd\u0005P\u0000\u0000\u02cd\u02ce\u0003<\u001e"+ + "\u0000\u02ce\u0091\u0001\u0000\u0000\u0000\u02cf\u02d0\u0005&\u0000\u0000"+ + "\u02d0\u02d1\u0003<\u001e\u0000\u02d1\u0093\u0001\u0000\u0000\u0000\u02d2"+ + "\u02d3\u0005\u0012\u0000\u0000\u02d3\u02d4\u00034\u001a\u0000\u02d4\u02d5"+ + "\u0005?\u0000\u0000\u02d5\u02d6\u0003\u00aaU\u0000\u02d6\u0095\u0001\u0000"+ + "\u0000\u0000\u02d7\u02d8\u0005\u0014\u0000\u0000\u02d8\u02d9\u00034\u001a"+ + "\u0000\u02d9\u02da\u0005?\u0000\u0000\u02da\u02db\u0003\u00aaU\u0000\u02db"+ + "\u0097\u0001\u0000\u0000\u0000\u02dc\u02dd\u0005)\u0000\u0000\u02dd\u02de"+ + "\u0003\u009aM\u0000\u02de\u02df\u0005C\u0000\u0000\u02df\u0099\u0001\u0000"+ + "\u0000\u0000\u02e0\u02e1\u0003>\u001f\u0000\u02e1\u02e4\u0005?\u0000\u0000"+ + "\u02e2\u02e5\u0003\u00b6[\u0000\u02e3\u02e5\u0003\u00b0X\u0000\u02e4\u02e2"+ + "\u0001\u0000\u0000\u0000\u02e4\u02e3\u0001\u0000\u0000\u0000\u02e5\u009b"+ + "\u0001\u0000\u0000\u0000\u02e6\u02e8\u0005\"\u0000\u0000\u02e7\u02e9\u0003"+ + "\u009eO\u0000\u02e8\u02e7\u0001\u0000\u0000\u0000\u02e8\u02e9\u0001\u0000"+ + "\u0000\u0000\u02e9\u02ea\u0001\u0000\u0000\u0000\u02ea\u02eb\u0005P\u0000"+ + "\u0000\u02eb\u02ec\u00034\u001a\u0000\u02ec\u02ed\u0005\u008d\u0000\u0000"+ + "\u02ed\u02ee\u0003\u00be_\u0000\u02ee\u02ef\u0003`0\u0000\u02ef\u009d"+ + "\u0001\u0000\u0000\u0000\u02f0\u02f3\u0003B!\u0000\u02f1\u02f3\u0003\u00aa"+ + "U\u0000\u02f2\u02f0\u0001\u0000\u0000\u0000\u02f2\u02f1\u0001\u0000\u0000"+ + "\u0000\u02f3\u009f\u0001\u0000\u0000\u0000\u02f4\u02f5\u0006P\uffff\uffff"+ + "\u0000\u02f5\u02f6\u0005M\u0000\u0000\u02f6\u0312\u0003\u00a0P\b\u02f7"+ + "\u0312\u0003\u00a6S\u0000\u02f8\u0312\u0003\u00a2Q\u0000\u02f9\u02fb\u0003"+ + "\u00a6S\u0000\u02fa\u02fc\u0005M\u0000\u0000\u02fb\u02fa\u0001\u0000\u0000"+ + "\u0000\u02fb\u02fc\u0001\u0000\u0000\u0000\u02fc\u02fd\u0001\u0000\u0000"+ + "\u0000\u02fd\u02fe\u0005I\u0000\u0000\u02fe\u02ff\u0005i\u0000\u0000\u02ff"+ + "\u0304\u0003\u00a6S\u0000\u0300\u0301\u0005D\u0000\u0000\u0301\u0303\u0003"+ + "\u00a6S\u0000\u0302\u0300\u0001\u0000\u0000\u0000\u0303\u0306\u0001\u0000"+ + "\u0000\u0000\u0304\u0302\u0001\u0000\u0000\u0000\u0304\u0305\u0001\u0000"+ + "\u0000\u0000\u0305\u0307\u0001\u0000\u0000\u0000\u0306\u0304\u0001\u0000"+ + "\u0000\u0000\u0307\u0308\u0005j\u0000\u0000\u0308\u0312\u0001\u0000\u0000"+ + "\u0000\u0309\u030a\u0003\u00a6S\u0000\u030a\u030c\u0005J\u0000\u0000\u030b"+ + "\u030d\u0005M\u0000\u0000\u030c\u030b\u0001\u0000\u0000\u0000\u030c\u030d"+ + "\u0001\u0000\u0000\u0000\u030d\u030e\u0001\u0000\u0000\u0000\u030e\u030f"+ + "\u0005N\u0000\u0000\u030f\u0312\u0001\u0000\u0000\u0000\u0310\u0312\u0003"+ + "\u00a4R\u0000\u0311\u02f4\u0001\u0000\u0000\u0000\u0311\u02f7\u0001\u0000"+ + "\u0000\u0000\u0311\u02f8\u0001\u0000\u0000\u0000\u0311\u02f9\u0001\u0000"+ + "\u0000\u0000\u0311\u0309\u0001\u0000\u0000\u0000\u0311\u0310\u0001\u0000"+ + "\u0000\u0000\u0312\u031b\u0001\u0000\u0000\u0000\u0313\u0314\n\u0005\u0000"+ + "\u0000\u0314\u0315\u0005=\u0000\u0000\u0315\u031a\u0003\u00a0P\u0006\u0316"+ + "\u0317\n\u0004\u0000\u0000\u0317\u0318\u0005Q\u0000\u0000\u0318\u031a"+ + "\u0003\u00a0P\u0005\u0319\u0313\u0001\u0000\u0000\u0000\u0319\u0316\u0001"+ + "\u0000\u0000\u0000\u031a\u031d\u0001\u0000\u0000\u0000\u031b\u0319\u0001"+ + "\u0000\u0000\u0000\u031b\u031c\u0001\u0000\u0000\u0000\u031c\u00a1\u0001"+ + "\u0000\u0000\u0000\u031d\u031b\u0001\u0000\u0000\u0000\u031e\u0320\u0003"+ + "\u00a6S\u0000\u031f\u0321\u0005M\u0000\u0000\u0320\u031f\u0001\u0000\u0000"+ + "\u0000\u0320\u0321\u0001\u0000\u0000\u0000\u0321\u0322\u0001\u0000\u0000"+ + "\u0000\u0322\u0323\u0005L\u0000\u0000\u0323\u0324\u0003H$\u0000\u0324"+ + "\u034d\u0001\u0000\u0000\u0000\u0325\u0327\u0003\u00a6S\u0000\u0326\u0328"+ + "\u0005M\u0000\u0000\u0327\u0326\u0001\u0000\u0000\u0000\u0327\u0328\u0001"+ + "\u0000\u0000\u0000\u0328\u0329\u0001\u0000\u0000\u0000\u0329\u032a\u0005"+ + "S\u0000\u0000\u032a\u032b\u0003H$\u0000\u032b\u034d\u0001\u0000\u0000"+ + "\u0000\u032c\u032e\u0003\u00a6S\u0000\u032d\u032f\u0005M\u0000\u0000\u032e"+ + "\u032d\u0001\u0000\u0000\u0000\u032e\u032f\u0001\u0000\u0000\u0000\u032f"+ + "\u0330\u0001\u0000\u0000\u0000\u0330\u0331\u0005L\u0000\u0000\u0331\u0332"+ + "\u0005i\u0000\u0000\u0332\u0337\u0003H$\u0000\u0333\u0334\u0005D\u0000"+ + "\u0000\u0334\u0336\u0003H$\u0000\u0335\u0333\u0001\u0000\u0000\u0000\u0336"+ + "\u0339\u0001\u0000\u0000\u0000\u0337\u0335\u0001\u0000\u0000\u0000\u0337"+ + "\u0338\u0001\u0000\u0000\u0000\u0338\u033a\u0001\u0000\u0000\u0000\u0339"+ + "\u0337\u0001\u0000\u0000\u0000\u033a\u033b\u0005j\u0000\u0000\u033b\u034d"+ + "\u0001\u0000\u0000\u0000\u033c\u033e\u0003\u00a6S\u0000\u033d\u033f\u0005"+ + "M\u0000\u0000\u033e\u033d\u0001\u0000\u0000\u0000\u033e\u033f\u0001\u0000"+ + "\u0000\u0000\u033f\u0340\u0001\u0000\u0000\u0000\u0340\u0341\u0005S\u0000"+ + "\u0000\u0341\u0342\u0005i\u0000\u0000\u0342\u0347\u0003H$\u0000\u0343"+ + "\u0344\u0005D\u0000\u0000\u0344\u0346\u0003H$\u0000\u0345\u0343\u0001"+ + "\u0000\u0000\u0000\u0346\u0349\u0001\u0000\u0000\u0000\u0347\u0345\u0001"+ + "\u0000\u0000\u0000\u0347\u0348\u0001\u0000\u0000\u0000\u0348\u034a\u0001"+ + "\u0000\u0000\u0000\u0349\u0347\u0001\u0000\u0000\u0000\u034a\u034b\u0005"+ + "j\u0000\u0000\u034b\u034d\u0001\u0000\u0000\u0000\u034c\u031e\u0001\u0000"+ + "\u0000\u0000\u034c\u0325\u0001\u0000\u0000\u0000\u034c\u032c\u0001\u0000"+ + "\u0000\u0000\u034c\u033c\u0001\u0000\u0000\u0000\u034d\u00a3\u0001\u0000"+ + "\u0000\u0000\u034e\u0351\u00034\u001a\u0000\u034f\u0350\u0005A\u0000\u0000"+ + "\u0350\u0352\u0003\f\u0006\u0000\u0351\u034f\u0001\u0000\u0000\u0000\u0351"+ + "\u0352\u0001\u0000\u0000\u0000\u0352\u0353\u0001\u0000\u0000\u0000\u0353"+ + "\u0354\u0005B\u0000\u0000\u0354\u0355\u0003\u00b6[\u0000\u0355\u00a5\u0001"+ + "\u0000\u0000\u0000\u0356\u035c\u0003\u00a8T\u0000\u0357\u0358\u0003\u00a8"+ + "T\u0000\u0358\u0359\u0003\u00c2a\u0000\u0359\u035a\u0003\u00a8T\u0000"+ + "\u035a\u035c\u0001\u0000\u0000\u0000\u035b\u0356\u0001\u0000\u0000\u0000"+ + "\u035b\u0357\u0001\u0000\u0000\u0000\u035c\u00a7\u0001\u0000\u0000\u0000"+ + "\u035d\u035e\u0006T\uffff\uffff\u0000\u035e\u0362\u0003\u00aaU\u0000\u035f"+ + "\u0360\u0007\u0005\u0000\u0000\u0360\u0362\u0003\u00a8T\u0003\u0361\u035d"+ + "\u0001\u0000\u0000\u0000\u0361\u035f\u0001\u0000\u0000\u0000\u0362\u036b"+ + "\u0001\u0000\u0000\u0000\u0363\u0364\n\u0002\u0000\u0000\u0364\u0365\u0007"+ + "\u0006\u0000\u0000\u0365\u036a\u0003\u00a8T\u0003\u0366\u0367\n\u0001"+ + "\u0000\u0000\u0367\u0368\u0007\u0005\u0000\u0000\u0368\u036a\u0003\u00a8"+ + "T\u0002\u0369\u0363\u0001\u0000\u0000\u0000\u0369\u0366\u0001\u0000\u0000"+ + "\u0000\u036a\u036d\u0001\u0000\u0000\u0000\u036b\u0369\u0001\u0000\u0000"+ + "\u0000\u036b\u036c\u0001\u0000\u0000\u0000\u036c\u00a9\u0001\u0000\u0000"+ + "\u0000\u036d\u036b\u0001\u0000\u0000\u0000\u036e\u036f\u0006U\uffff\uffff"+ + "\u0000\u036f\u0377\u0003\u00b6[\u0000\u0370\u0377\u00034\u001a\u0000\u0371"+ + "\u0377\u0003\u00acV\u0000\u0372\u0373\u0005i\u0000\u0000\u0373\u0374\u0003"+ + "\u00a0P\u0000\u0374\u0375\u0005j\u0000\u0000\u0375\u0377\u0001\u0000\u0000"+ + "\u0000\u0376\u036e\u0001\u0000\u0000\u0000\u0376\u0370\u0001\u0000\u0000"+ + "\u0000\u0376\u0371\u0001\u0000\u0000\u0000\u0376\u0372\u0001\u0000\u0000"+ + "\u0000\u0377\u037d\u0001\u0000\u0000\u0000\u0378\u0379\n\u0001\u0000\u0000"+ + "\u0379\u037a\u0005A\u0000\u0000\u037a\u037c\u0003\f\u0006\u0000\u037b"+ + "\u0378\u0001\u0000\u0000\u0000\u037c\u037f\u0001\u0000\u0000\u0000\u037d"+ + "\u037b\u0001\u0000\u0000\u0000\u037d\u037e\u0001\u0000\u0000\u0000\u037e"+ + "\u00ab\u0001\u0000\u0000\u0000\u037f\u037d\u0001\u0000\u0000\u0000\u0380"+ + "\u0381\u0003\u00aeW\u0000\u0381\u038f\u0005i\u0000\u0000\u0382\u0390\u0005"+ + "_\u0000\u0000\u0383\u0388\u0003\u00a0P\u0000\u0384\u0385\u0005D\u0000"+ + "\u0000\u0385\u0387\u0003\u00a0P\u0000\u0386\u0384\u0001\u0000\u0000\u0000"+ + "\u0387\u038a\u0001\u0000\u0000\u0000\u0388\u0386\u0001\u0000\u0000\u0000"+ + "\u0388\u0389\u0001\u0000\u0000\u0000\u0389\u038d\u0001\u0000\u0000\u0000"+ + "\u038a\u0388\u0001\u0000\u0000\u0000\u038b\u038c\u0005D\u0000\u0000\u038c"+ + "\u038e\u0003\u00b0X\u0000\u038d\u038b\u0001\u0000\u0000\u0000\u038d\u038e"+ + "\u0001\u0000\u0000\u0000\u038e\u0390\u0001\u0000\u0000\u0000\u038f\u0382"+ + "\u0001\u0000\u0000\u0000\u038f\u0383\u0001\u0000\u0000\u0000\u038f\u0390"+ + "\u0001\u0000\u0000\u0000\u0390\u0391\u0001\u0000\u0000\u0000\u0391\u0392"+ + "\u0005j\u0000\u0000\u0392\u00ad\u0001\u0000\u0000\u0000\u0393\u0397\u0003"+ + "F#\u0000\u0394\u0397\u0005H\u0000\u0000\u0395\u0397\u0005K\u0000\u0000"+ + "\u0396\u0393\u0001\u0000\u0000\u0000\u0396\u0394\u0001\u0000\u0000\u0000"+ + "\u0396\u0395\u0001\u0000\u0000\u0000\u0397\u00af\u0001\u0000\u0000\u0000"+ + "\u0398\u03a1\u0005b\u0000\u0000\u0399\u039e\u0003\u00b2Y\u0000\u039a\u039b"+ + "\u0005D\u0000\u0000\u039b\u039d\u0003\u00b2Y\u0000\u039c\u039a\u0001\u0000"+ + "\u0000\u0000\u039d\u03a0\u0001\u0000\u0000\u0000\u039e\u039c\u0001\u0000"+ + "\u0000\u0000\u039e\u039f\u0001\u0000\u0000\u0000\u039f\u03a2\u0001\u0000"+ + "\u0000\u0000\u03a0\u039e\u0001\u0000\u0000\u0000\u03a1\u0399\u0001\u0000"+ + "\u0000\u0000\u03a1\u03a2\u0001\u0000\u0000\u0000\u03a2\u03a3\u0001\u0000"+ + "\u0000\u0000\u03a3\u03a4\u0005c\u0000\u0000\u03a4\u00b1\u0001\u0000\u0000"+ + "\u0000\u03a5\u03a6\u0003\u00c0`\u0000\u03a6\u03a7\u0005B\u0000\u0000\u03a7"+ + "\u03a8\u0003\u00b4Z\u0000\u03a8\u00b3\u0001\u0000\u0000\u0000\u03a9\u03ac"+ + "\u0003\u00b6[\u0000\u03aa\u03ac\u0003\u00b0X\u0000\u03ab\u03a9\u0001\u0000"+ + "\u0000\u0000\u03ab\u03aa\u0001\u0000\u0000\u0000\u03ac\u00b5\u0001\u0000"+ + "\u0000\u0000\u03ad\u03d8\u0005N\u0000\u0000\u03ae\u03af\u0003\u00be_\u0000"+ + "\u03af\u03b0\u0005k\u0000\u0000\u03b0\u03d8\u0001\u0000\u0000\u0000\u03b1"+ + "\u03d8\u0003\u00bc^\u0000\u03b2\u03d8\u0003\u00be_\u0000\u03b3\u03d8\u0003"+ + "\u00b8\\\u0000\u03b4\u03d8\u0003B!\u0000\u03b5\u03d8\u0003\u00c0`\u0000"+ + "\u03b6\u03b7\u0005g\u0000\u0000\u03b7\u03bc\u0003\u00ba]\u0000\u03b8\u03b9"+ + "\u0005D\u0000\u0000\u03b9\u03bb\u0003\u00ba]\u0000\u03ba\u03b8\u0001\u0000"+ + "\u0000\u0000\u03bb\u03be\u0001\u0000\u0000\u0000\u03bc\u03ba\u0001\u0000"+ + "\u0000\u0000\u03bc\u03bd\u0001\u0000\u0000\u0000\u03bd\u03bf\u0001\u0000"+ + "\u0000\u0000\u03be\u03bc\u0001\u0000\u0000\u0000\u03bf\u03c0\u0005h\u0000"+ + "\u0000\u03c0\u03d8\u0001\u0000\u0000\u0000\u03c1\u03c2\u0005g\u0000\u0000"+ + "\u03c2\u03c7\u0003\u00b8\\\u0000\u03c3\u03c4\u0005D\u0000\u0000\u03c4"+ + "\u03c6\u0003\u00b8\\\u0000\u03c5\u03c3\u0001\u0000\u0000\u0000\u03c6\u03c9"+ + "\u0001\u0000\u0000\u0000\u03c7\u03c5\u0001\u0000\u0000\u0000\u03c7\u03c8"+ + "\u0001\u0000\u0000\u0000\u03c8\u03ca\u0001\u0000\u0000\u0000\u03c9\u03c7"+ + "\u0001\u0000\u0000\u0000\u03ca\u03cb\u0005h\u0000\u0000\u03cb\u03d8\u0001"+ + "\u0000\u0000\u0000\u03cc\u03cd\u0005g\u0000\u0000\u03cd\u03d2\u0003\u00c0"+ + "`\u0000\u03ce\u03cf\u0005D\u0000\u0000\u03cf\u03d1\u0003\u00c0`\u0000"+ + "\u03d0\u03ce\u0001\u0000\u0000\u0000\u03d1\u03d4\u0001\u0000\u0000\u0000"+ + "\u03d2\u03d0\u0001\u0000\u0000\u0000\u03d2\u03d3\u0001\u0000\u0000\u0000"+ + "\u03d3\u03d5\u0001\u0000\u0000\u0000\u03d4\u03d2\u0001\u0000\u0000\u0000"+ + "\u03d5\u03d6\u0005h\u0000\u0000\u03d6\u03d8\u0001\u0000\u0000\u0000\u03d7"+ + "\u03ad\u0001\u0000\u0000\u0000\u03d7\u03ae\u0001\u0000\u0000\u0000\u03d7"+ + "\u03b1\u0001\u0000\u0000\u0000\u03d7\u03b2\u0001\u0000\u0000\u0000\u03d7"+ + "\u03b3\u0001\u0000\u0000\u0000\u03d7\u03b4\u0001\u0000\u0000\u0000\u03d7"+ + "\u03b5\u0001\u0000\u0000\u0000\u03d7\u03b6\u0001\u0000\u0000\u0000\u03d7"+ + "\u03c1\u0001\u0000\u0000\u0000\u03d7\u03cc\u0001\u0000\u0000\u0000\u03d8"+ + "\u00b7\u0001\u0000\u0000\u0000\u03d9\u03da\u0007\u0007\u0000\u0000\u03da"+ + "\u00b9\u0001\u0000\u0000\u0000\u03db\u03de\u0003\u00bc^\u0000\u03dc\u03de"+ + "\u0003\u00be_\u0000\u03dd\u03db\u0001\u0000\u0000\u0000\u03dd\u03dc\u0001"+ + "\u0000\u0000\u0000\u03de\u00bb\u0001\u0000\u0000\u0000\u03df\u03e1\u0007"+ + "\u0005\u0000\u0000\u03e0\u03df\u0001\u0000\u0000\u0000\u03e0\u03e1\u0001"+ + "\u0000\u0000\u0000\u03e1\u03e2\u0001\u0000\u0000\u0000\u03e2\u03e3\u0005"+ + "<\u0000\u0000\u03e3\u00bd\u0001\u0000\u0000\u0000\u03e4\u03e6\u0007\u0005"+ + "\u0000\u0000\u03e5\u03e4\u0001\u0000\u0000\u0000\u03e5\u03e6\u0001\u0000"+ + "\u0000\u0000\u03e6\u03e7\u0001\u0000\u0000\u0000\u03e7\u03e8\u0005;\u0000"+ + "\u0000\u03e8\u00bf\u0001\u0000\u0000\u0000\u03e9\u03ea\u0005:\u0000\u0000"+ + "\u03ea\u00c1\u0001\u0000\u0000\u0000\u03eb\u03ec\u0007\b\u0000\u0000\u03ec"+ + "\u00c3\u0001\u0000\u0000\u0000\u03ed\u03ee\u0007\t\u0000\u0000\u03ee\u03ef"+ + "\u0005\u0082\u0000\u0000\u03ef\u03f0\u0003\u00c6c\u0000\u03f0\u03f1\u0003"+ + "\u00c8d\u0000\u03f1\u00c5\u0001\u0000\u0000\u0000\u03f2\u03f3\u0004c\u000f"+ + "\u0000\u03f3\u03f5\u0003 \u0010\u0000\u03f4\u03f6\u0005\u009e\u0000\u0000"+ + "\u03f5\u03f4\u0001\u0000\u0000\u0000\u03f5\u03f6\u0001\u0000\u0000\u0000"+ + "\u03f6\u03f7\u0001\u0000\u0000\u0000\u03f7\u03f8\u0005q\u0000\u0000\u03f8"+ + "\u03fb\u0001\u0000\u0000\u0000\u03f9\u03fb\u0003 \u0010\u0000\u03fa\u03f2"+ + "\u0001\u0000\u0000\u0000\u03fa\u03f9\u0001\u0000\u0000\u0000\u03fb\u00c7"+ + "\u0001\u0000\u0000\u0000\u03fc\u03fd\u0005P\u0000\u0000\u03fd\u0402\u0003"+ + "\u00a0P\u0000\u03fe\u03ff\u0005D\u0000\u0000\u03ff\u0401\u0003\u00a0P"+ + "\u0000\u0400\u03fe\u0001\u0000\u0000\u0000\u0401\u0404\u0001\u0000\u0000"+ + "\u0000\u0402\u0400\u0001\u0000\u0000\u0000\u0402\u0403\u0001\u0000\u0000"+ + "\u0000\u0403\u00c9\u0001\u0000\u0000\u0000\u0404\u0402\u0001\u0000\u0000"+ + "\u0000\u0405\u0409\u0005\'\u0000\u0000\u0406\u0408\u0003\u00ceg\u0000"+ + "\u0407\u0406\u0001\u0000\u0000\u0000\u0408\u040b\u0001\u0000\u0000\u0000"+ + "\u0409\u0407\u0001\u0000\u0000\u0000\u0409\u040a\u0001\u0000\u0000\u0000"+ + "\u040a\u040f\u0001\u0000\u0000\u0000\u040b\u0409\u0001\u0000\u0000\u0000"+ + "\u040c\u040d\u0003\u00ccf\u0000\u040d\u040e\u0005?\u0000\u0000\u040e\u0410"+ + "\u0001\u0000\u0000\u0000\u040f\u040c\u0001\u0000\u0000\u0000\u040f\u0410"+ + "\u0001\u0000\u0000\u0000\u0410\u0411\u0001\u0000\u0000\u0000\u0411\u0413"+ + "\u0005i\u0000\u0000\u0412\u0414\u0003\u00d6k\u0000\u0413\u0412\u0001\u0000"+ + "\u0000\u0000\u0414\u0415\u0001\u0000\u0000\u0000\u0415\u0413\u0001\u0000"+ + "\u0000\u0000\u0415\u0416\u0001\u0000\u0000\u0000\u0416\u0417\u0001\u0000"+ + "\u0000\u0000\u0417\u0418\u0005j\u0000\u0000\u0418\u0426\u0001\u0000\u0000"+ + "\u0000\u0419\u041d\u0005\'\u0000\u0000\u041a\u041c\u0003\u00ceg\u0000"+ + "\u041b\u041a\u0001\u0000\u0000\u0000\u041c\u041f\u0001\u0000\u0000\u0000"+ + "\u041d\u041b\u0001\u0000\u0000\u0000\u041d\u041e\u0001\u0000\u0000\u0000"+ + "\u041e\u0421\u0001\u0000\u0000\u0000\u041f\u041d\u0001\u0000\u0000\u0000"+ + "\u0420\u0422\u0003\u00d6k\u0000\u0421\u0420\u0001\u0000\u0000\u0000\u0422"+ + "\u0423\u0001\u0000\u0000\u0000\u0423\u0421\u0001\u0000\u0000\u0000\u0423"+ + "\u0424\u0001\u0000\u0000\u0000\u0424\u0426\u0001\u0000\u0000\u0000\u0425"+ + "\u0405\u0001\u0000\u0000\u0000\u0425\u0419\u0001\u0000\u0000\u0000\u0426"+ + "\u00cb\u0001\u0000\u0000\u0000\u0427\u0428\u0007\u0001\u0000\u0000\u0428"+ + "\u00cd\u0001\u0000\u0000\u0000\u0429\u042a\u0003\u00d0h\u0000\u042a\u042b"+ + "\u0005?\u0000\u0000\u042b\u042c\u0003\u00d2i\u0000\u042c\u00cf\u0001\u0000"+ + "\u0000\u0000\u042d\u042e\u0007\n\u0000\u0000\u042e\u00d1\u0001\u0000\u0000"+ + "\u0000\u042f\u0434\u0003\u00d8l\u0000\u0430\u0431\u0005D\u0000\u0000\u0431"+ + "\u0433\u0003\u00d8l\u0000\u0432\u0430\u0001\u0000\u0000\u0000\u0433\u0436"+ + "\u0001\u0000\u0000\u0000\u0434\u0432\u0001\u0000\u0000\u0000\u0434\u0435"+ + "\u0001\u0000\u0000\u0000\u0435\u043a\u0001\u0000\u0000\u0000\u0436\u0434"+ + "\u0001\u0000\u0000\u0000\u0437\u043a\u0005l\u0000\u0000\u0438\u043a\u0005"+ + "e\u0000\u0000\u0439\u042f\u0001\u0000\u0000\u0000\u0439\u0437\u0001\u0000"+ + "\u0000\u0000\u0439\u0438\u0001\u0000\u0000\u0000\u043a\u00d3\u0001\u0000"+ + "\u0000\u0000\u043b\u043c\u0007\u000b\u0000\u0000\u043c\u00d5\u0001\u0000"+ + "\u0000\u0000\u043d\u043f\u0003\u00d4j\u0000\u043e\u043d\u0001\u0000\u0000"+ + "\u0000\u043f\u0440\u0001\u0000\u0000\u0000\u0440\u043e\u0001\u0000\u0000"+ + "\u0000\u0440\u0441\u0001\u0000\u0000\u0000\u0441\u044b\u0001\u0000\u0000"+ + "\u0000\u0442\u0446\u0005i\u0000\u0000\u0443\u0445\u0003\u00d6k\u0000\u0444"+ + "\u0443\u0001\u0000\u0000\u0000\u0445\u0448\u0001\u0000\u0000\u0000\u0446"+ + "\u0444\u0001\u0000\u0000\u0000\u0446\u0447\u0001\u0000\u0000\u0000\u0447"+ + "\u0449\u0001\u0000\u0000\u0000\u0448\u0446\u0001\u0000\u0000\u0000\u0449"+ + "\u044b\u0005j\u0000\u0000\u044a\u043e\u0001\u0000\u0000\u0000\u044a\u0442"+ + "\u0001\u0000\u0000\u0000\u044b\u00d7\u0001\u0000\u0000\u0000\u044c\u044d"+ + "\u0003\u00dam\u0000\u044d\u044e\u0005B\u0000\u0000\u044e\u044f\u0003\u00de"+ + "o\u0000\u044f\u0456\u0001\u0000\u0000\u0000\u0450\u0451\u0003\u00deo\u0000"+ + "\u0451\u0452\u0005A\u0000\u0000\u0452\u0453\u0003\u00dcn\u0000\u0453\u0456"+ + "\u0001\u0000\u0000\u0000\u0454\u0456\u0003\u00e0p\u0000\u0455\u044c\u0001"+ + "\u0000\u0000\u0000\u0455\u0450\u0001\u0000\u0000\u0000\u0455\u0454\u0001"+ + "\u0000\u0000\u0000\u0456\u00d9\u0001\u0000\u0000\u0000\u0457\u0458\u0007"+ + "\f\u0000\u0000\u0458\u00db\u0001\u0000\u0000\u0000\u0459\u045a\u0007\f"+ + "\u0000\u0000\u045a\u00dd\u0001\u0000\u0000\u0000\u045b\u045c\u0007\f\u0000"+ + "\u0000\u045c\u00df\u0001\u0000\u0000\u0000\u045d\u045e\u0007\r\u0000\u0000"+ + "\u045e\u00e1\u0001\u0000\u0000\u0000m\u00e5\u00f6\u0102\u0121\u0130\u0136"+ + "\u0149\u014d\u0152\u015a\u0162\u0167\u016a\u017a\u0182\u0186\u018d\u0193"+ + "\u0198\u01a1\u01a8\u01ae\u01b7\u01be\u01c6\u01ce\u01d2\u01d6\u01db\u01df"+ + "\u01e4\u01f0\u01f5\u01f9\u0207\u0212\u0218\u021f\u0228\u0231\u0245\u024d"+ + "\u0250\u0257\u0262\u0269\u0271\u027f\u0288\u0293\u029d\u02a3\u02a5\u02a9"+ + "\u02ae\u02bc\u02c3\u02e4\u02e8\u02f2\u02fb\u0304\u030c\u0311\u0319\u031b"+ + "\u0320\u0327\u032e\u0337\u033e\u0347\u034c\u0351\u035b\u0361\u0369\u036b"+ + "\u0376\u037d\u0388\u038d\u038f\u0396\u039e\u03a1\u03ab\u03bc\u03c7\u03d2"+ + "\u03d7\u03dd\u03e0\u03e5\u03f5\u03fa\u0402\u0409\u040f\u0415\u041d\u0423"+ + "\u0425\u0434\u0439\u0440\u0446\u044a\u0455"; 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 1d49d2cad028a..3dc6e13b4b083 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 @@ -512,6 +512,18 @@ public class EsqlBaseParserBaseListener implements EsqlBaseParserListener { *

The default implementation does nothing.

*/ @Override public void exitLimitCommand(EsqlBaseParser.LimitCommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLimitByGroupKey(EsqlBaseParser.LimitByGroupKeyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLimitByGroupKey(EsqlBaseParser.LimitByGroupKeyContext 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 add6369f9fcf5..a02700bb92ec9 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 @@ -307,6 +307,13 @@ public class EsqlBaseParserBaseVisitor extends AbstractParseTreeVisitor im * {@link #visitChildren} on {@code ctx}.

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

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

+ */ + @Override public T visitLimitByGroupKey(EsqlBaseParser.LimitByGroupKeyContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * 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 edcc9588dea9c..b687c843f4f3e 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 @@ -439,6 +439,16 @@ public interface EsqlBaseParserListener extends ParseTreeListener { * @param ctx the parse tree */ void exitLimitCommand(EsqlBaseParser.LimitCommandContext ctx); + /** + * Enter a parse tree produced by {@link EsqlBaseParser#limitByGroupKey}. + * @param ctx the parse tree + */ + void enterLimitByGroupKey(EsqlBaseParser.LimitByGroupKeyContext ctx); + /** + * Exit a parse tree produced by {@link EsqlBaseParser#limitByGroupKey}. + * @param ctx the parse tree + */ + void exitLimitByGroupKey(EsqlBaseParser.LimitByGroupKeyContext ctx); /** * Enter a parse tree produced by {@link EsqlBaseParser#sortCommand}. * @param ctx the parse tree 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 206a96eb0d401..f442d12e6aa3d 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 @@ -271,6 +271,12 @@ public interface EsqlBaseParserVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitLimitCommand(EsqlBaseParser.LimitCommandContext ctx); + /** + * Visit a parse tree produced by {@link EsqlBaseParser#limitByGroupKey}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLimitByGroupKey(EsqlBaseParser.LimitByGroupKeyContext ctx); /** * Visit a parse tree produced by {@link EsqlBaseParser#sortCommand}. * @param ctx the parse tree 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 793308553e300..a15b18b06ec28 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 @@ -593,7 +593,16 @@ public PlanFactory visitWhereCommand(EsqlBaseParser.WhereCommandContext ctx) { public PlanFactory visitLimitCommand(EsqlBaseParser.LimitCommandContext ctx) { Source source = source(ctx); Object val = expression(ctx.constant()).fold(FoldContext.small() /* TODO remove me */); + if (val instanceof Integer i && i >= 0) { + List groupings; + + var limitByGroupKey = ctx.limitByGroupKey(); + if (limitByGroupKey != null) { + groupings = new ArrayList<>(visitGrouping(limitByGroupKey.grouping)); + return input -> new Limit(source, new Literal(source, i, DataType.INTEGER), input, groupings); + } + return input -> new Limit(source, new Literal(source, i, DataType.INTEGER), input); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Limit.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Limit.java index 6d57f3010df73..00a81be6473dc 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Limit.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Limit.java @@ -6,22 +6,29 @@ */ package org.elasticsearch.xpack.esql.plan.logical; +import org.elasticsearch.TransportVersion; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.xpack.esql.capabilities.TelemetryAware; +import org.elasticsearch.xpack.esql.core.capabilities.Resolvables; import org.elasticsearch.xpack.esql.core.expression.Expression; import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput; import java.io.IOException; +import java.util.List; import java.util.Objects; public class Limit extends UnaryPlan implements TelemetryAware, PipelineBreaker, ExecutesOn { + public static final TransportVersion ESQL_LIMIT_BY = TransportVersion.fromName("esql_limit_by"); + public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(LogicalPlan.class, "Limit", Limit::new); private final Expression limit; + + private final List groupings; /** * Important for optimizations. This should be {@code false} in most cases, which allows this instance to be duplicated past a child * plan node that increases the number of rows, like for LOOKUP JOIN and MV_EXPAND. @@ -40,14 +47,23 @@ public class Limit extends UnaryPlan implements TelemetryAware, PipelineBreaker, * and {@link Limit#local} to {@code false}. */ public Limit(Source source, Expression limit, LogicalPlan child) { - this(source, limit, child, false, false); + this(source, limit, child, List.of(), false, false); } - public Limit(Source source, Expression limit, LogicalPlan child, boolean duplicated, boolean local) { + /** + * Create a new instance with groupings, which are the expressions used in LIMIT BY. This sets {@link Limit#duplicated} + * and {@link Limit#local} to {@code false}. + */ + public Limit(Source source, Expression limit, LogicalPlan child, List groupings) { + this(source, limit, child, groupings, false, false); + } + + public Limit(Source source, Expression limit, LogicalPlan child, List groupings, boolean duplicated, boolean local) { super(source, child); this.limit = limit; this.duplicated = duplicated; this.local = local; + this.groupings = groupings; } /** @@ -58,6 +74,7 @@ private Limit(StreamInput in) throws IOException { Source.readFrom((PlanStreamInput) in), in.readNamedWriteable(Expression.class), in.readNamedWriteable(LogicalPlan.class), + in.getTransportVersion().supports(ESQL_LIMIT_BY) ? in.readNamedWriteableCollectionAsList(Expression.class) : List.of(), false, false ); @@ -73,6 +90,12 @@ public void writeTo(StreamOutput out) throws IOException { Source.EMPTY.writeTo(out); out.writeNamedWriteable(limit()); out.writeNamedWriteable(child()); + + if (out.getTransportVersion().supports(ESQL_LIMIT_BY)) { + out.writeNamedWriteableCollection(groupings()); + } else if (groupings.isEmpty() == false) { + throw new IllegalArgumentException("LIMIT BY is not supported by all nodes in the cluster"); + } } @Override @@ -82,20 +105,24 @@ public String getWriteableName() { @Override protected NodeInfo info() { - return NodeInfo.create(this, Limit::new, limit, child(), duplicated, local); + return NodeInfo.create(this, Limit::new, limit, child(), groupings, duplicated, local); } @Override public Limit replaceChild(LogicalPlan newChild) { - return new Limit(source(), limit, newChild, duplicated, local); + return new Limit(source(), limit, newChild, groupings, duplicated, local); } public Expression limit() { return limit; } + public List groupings() { + return groupings; + } + public Limit withLimit(Expression limit) { - return new Limit(source(), limit, child(), duplicated, local); + return new Limit(source(), limit, child(), groupings, duplicated, local); } public boolean duplicated() { @@ -107,21 +134,21 @@ public boolean local() { } public Limit withDuplicated(boolean duplicated) { - return new Limit(source(), limit, child(), duplicated, local); + return new Limit(source(), limit, child(), groupings, duplicated, local); } public Limit withLocal(boolean newLocal) { - return new Limit(source(), limit, child(), duplicated, newLocal); + return new Limit(source(), limit, child(), groupings, duplicated, newLocal); } @Override public boolean expressionsResolved() { - return limit.resolved(); + return limit.resolved() && Resolvables.resolved(groupings); } @Override public int hashCode() { - return Objects.hash(limit, child(), duplicated, local); + return Objects.hash(limit, child(), duplicated, local, groupings); } @Override @@ -138,7 +165,8 @@ public boolean equals(Object obj) { return Objects.equals(limit, other.limit) && Objects.equals(child(), other.child()) && (duplicated == other.duplicated) - && (local == other.local); + && (local == other.local) + && Objects.equals(groupings, other.groupings); } @Override diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/physical/LimitExec.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/physical/LimitExec.java index 0619a3b2fd77d..ef38d367eaf6b 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/physical/LimitExec.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/physical/LimitExec.java @@ -22,31 +22,37 @@ import java.util.List; import java.util.Objects; +import static org.elasticsearch.xpack.esql.plan.logical.Limit.ESQL_LIMIT_BY; + public class LimitExec extends UnaryExec implements EstimatesRowSize { public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry( PhysicalPlan.class, "LimitExec", - LimitExec::new + LimitExec::readFrom ); private static final TransportVersion ESQL_LIMIT_ROW_SIZE = TransportVersion.fromName("esql_limit_row_size"); private final Expression limit; private final Integer estimatedRowSize; + private final List groupings; - public LimitExec(Source source, PhysicalPlan child, Expression limit, Integer estimatedRowSize) { + public LimitExec(Source source, PhysicalPlan child, Expression limit, List groupings, Integer estimatedRowSize) { super(source, child); this.limit = limit; + this.groupings = groupings; this.estimatedRowSize = estimatedRowSize; } - private LimitExec(StreamInput in) throws IOException { - this( - Source.readFrom((PlanStreamInput) in), - in.readNamedWriteable(PhysicalPlan.class), - in.readNamedWriteable(Expression.class), - in.getTransportVersion().supports(ESQL_LIMIT_ROW_SIZE) ? in.readOptionalVInt() : null - ); + private static LimitExec readFrom(StreamInput in) throws IOException { + Source source = Source.readFrom((PlanStreamInput) in); + PhysicalPlan child = in.readNamedWriteable(PhysicalPlan.class); + Expression limit = in.readNamedWriteable(Expression.class); + Integer estimatedRowSize = in.getTransportVersion().supports(ESQL_LIMIT_ROW_SIZE) ? in.readOptionalVInt() : null; + List groupings = in.getTransportVersion().supports(ESQL_LIMIT_BY) + ? in.readNamedWriteableCollectionAsList(Expression.class) + : List.of(); + return new LimitExec(source, child, limit, groupings, estimatedRowSize); } @Override @@ -57,6 +63,12 @@ public void writeTo(StreamOutput out) throws IOException { if (out.getTransportVersion().supports(ESQL_LIMIT_ROW_SIZE)) { out.writeOptionalVInt(estimatedRowSize); } + + if (out.getTransportVersion().supports(ESQL_LIMIT_BY)) { + out.writeNamedWriteableCollection(groupings()); + } else if (groupings.isEmpty() == false) { + throw new IllegalArgumentException("LIMIT BY is not supported by all nodes in the cluster"); + } } @Override @@ -66,18 +78,22 @@ public String getWriteableName() { @Override protected NodeInfo info() { - return NodeInfo.create(this, LimitExec::new, child(), limit, estimatedRowSize); + return NodeInfo.create(this, LimitExec::new, child(), limit, groupings, estimatedRowSize); } @Override public LimitExec replaceChild(PhysicalPlan newChild) { - return new LimitExec(source(), newChild, limit, estimatedRowSize); + return new LimitExec(source(), newChild, limit, groupings, estimatedRowSize); } public Expression limit() { return limit; } + public List groupings() { + return groupings; + } + public Integer estimatedRowSize() { return estimatedRowSize; } @@ -90,12 +106,12 @@ public PhysicalPlan estimateRowSize(State unused) { state.add(needsSortedDocIds, output); int size = state.consumeAllFields(true); size = Math.max(size, 1); - return Objects.equals(this.estimatedRowSize, size) ? this : new LimitExec(source(), child(), limit, size); + return Objects.equals(this.estimatedRowSize, size) ? this : new LimitExec(source(), child(), limit, groupings, size); } @Override public int hashCode() { - return Objects.hash(limit, estimatedRowSize, child()); + return Objects.hash(limit, groupings, estimatedRowSize, child()); } @Override @@ -110,6 +126,7 @@ public boolean equals(Object obj) { LimitExec other = (LimitExec) obj; return Objects.equals(limit, other.limit) + && Objects.equals(groupings, other.groupings) && Objects.equals(estimatedRowSize, other.estimatedRowSize) && Objects.equals(child(), other.child()); diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java index d80b86a13562f..1debaf1970caa 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java @@ -38,6 +38,7 @@ import org.elasticsearch.compute.operator.DriverContext; import org.elasticsearch.compute.operator.EvalOperator.EvalOperatorFactory; import org.elasticsearch.compute.operator.FilterOperator.FilterOperatorFactory; +import org.elasticsearch.compute.operator.GroupedLimitOperator; import org.elasticsearch.compute.operator.LimitOperator; import org.elasticsearch.compute.operator.LocalSourceOperator; import org.elasticsearch.compute.operator.LocalSourceOperator.LocalSourceFactory; @@ -568,12 +569,7 @@ private PhysicalOperation planTopN(TopNExec topNExec, LocalExecutionPlannerConte }; } List orders = topNExec.order().stream().map(order -> { - int sortByChannel; - if (order.child() instanceof Attribute a) { - sortByChannel = source.layout.get(a.id()).channel(); - } else { - throw new EsqlIllegalArgumentException("order by expression must be an attribute"); - } + int sortByChannel = getAttributeChannel(order.child(), source.layout, "order by expression must be an attribute"); return new TopNOperator.SortOrder( sortByChannel, @@ -604,6 +600,14 @@ private PhysicalOperation planTopN(TopNExec topNExec, LocalExecutionPlannerConte ); } + private static int getAttributeChannel(Expression expression, Layout layout, String errMessage) { + if (expression instanceof Attribute a) { + return layout.get(a.id()).channel(); + } else { + throw new EsqlIllegalArgumentException(errMessage); + } + } + private static MappedFieldType.FieldExtractPreference fieldExtractPreference(TopNExec topNExec, Set nameIds) { MappedFieldType.FieldExtractPreference fieldExtractPreference = MappedFieldType.FieldExtractPreference.NONE; // See if any of the NameIds is marked as having been loaded with doc-values preferences, which will affect the ElementType chosen. @@ -1410,7 +1414,21 @@ private PhysicalOperation planFilter(FilterExec filter, LocalExecutionPlannerCon private PhysicalOperation planLimit(LimitExec limit, LocalExecutionPlannerContext context) { PhysicalOperation source = plan(limit.child(), context); - return source.with(new LimitOperator.Factory((Integer) limit.limit().fold(context.foldCtx)), source.layout); + int limitValue = (Integer) limit.limit().fold(context.foldCtx); + if (limit.groupings().isEmpty()) { + return source.with(new LimitOperator.Factory(limitValue), source.layout); + } + Layout layout = source.layout; + List groupKeys = limit.groupings() + .stream() + .map(g -> getAttributeChannel(g, layout, "LIMIT BY expression must be an attribute")) + .toList(); + List inverse = layout.inverse(); + List elementTypes = new ArrayList<>(layout.numberOfChannels()); + for (int channel = 0; channel < inverse.size(); channel++) { + elementTypes.add(PlannerUtils.toElementType(inverse.get(channel).type())); + } + return source.with(new GroupedLimitOperator.Factory(limitValue, groupKeys, elementTypes), source.layout); } private PhysicalOperation planMvExpand(MvExpandExec mvExpandExec, LocalExecutionPlannerContext context) { diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/mapper/LocalMapper.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/mapper/LocalMapper.java index f0fbf6fbf9730..ad448dcb08cd7 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/mapper/LocalMapper.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/mapper/LocalMapper.java @@ -91,7 +91,7 @@ private PhysicalPlan mapUnary(UnaryPlan unary) { } if (unary instanceof Limit limit) { - return new LimitExec(limit.source(), mappedChild, limit.limit(), null); + return new LimitExec(limit.source(), mappedChild, limit.limit(), limit.groupings(), null); } if (unary instanceof TopN topN) { diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/mapper/Mapper.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/mapper/Mapper.java index 74af3481cb924..358cbcb699038 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/mapper/Mapper.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/mapper/Mapper.java @@ -141,7 +141,7 @@ else if (aggregate.groupings() if (unary instanceof Limit limit) { mappedChild = addExchangeForFragment(limit, mappedChild); - return new LimitExec(limit.source(), mappedChild, limit.limit(), null); + return new LimitExec(limit.source(), mappedChild, limit.limit(), limit.groupings(), null); } if (unary instanceof TopN topN) { diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerTests.java index 14d9e4270946f..ccedf549a03fa 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerTests.java @@ -1395,6 +1395,15 @@ public void testImplicitDefaultLimitAfterBreakerAndNonBreakers() { } } + public void testImplicitDefaultLimitAfterLimitBy() { + var plan = analyze("from test | limit 1 by emp_no"); + + var defaultLimit = as(plan, Limit.class); + assertThat(as(defaultLimit.limit(), Literal.class).value(), equalTo(MAX_LIMIT)); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + } + private static final String[] COMPARISONS = new String[] { "==", "!=", "<", "<=", ">", ">=" }; public void testCompareIntToString() { diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java index b9222c0d07cdb..2be8df05d9784 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java @@ -3890,6 +3890,52 @@ public void testMMRLimitedInput() { """), containsString("MMR can only be used on a limited number of rows. Consider adding a LIMIT before MMR.")); } + public void testLimitBy() { + assertThat(error(""" + FROM test + | SORT salary DESC + | LIMIT 5 BY languages + """, defaultAnalyzer, VerificationException.class), containsString("SORT cannot be used before LIMIT BY")); + + assertThat(error(""" + FROM test + | SORT salary DESC + | EVAL g = languages * 2 + | LIMIT 5 BY languages + """, defaultAnalyzer, VerificationException.class), containsString("SORT cannot be used before LIMIT BY")); + + assertThat(error(""" + FROM test + | SORT salary DESC + | EVAL g = languages * 2 + | EVAL h = 2 * g + | LIMIT 5 BY h + """, defaultAnalyzer, VerificationException.class), containsString("SORT cannot be used before LIMIT BY")); + + assertThat(error(""" + FROM test + | LIMIT 5 BY made_up_attr + """, defaultAnalyzer, VerificationException.class), containsString("Unknown column [made_up_attr]")); + + assertThat(error(""" + FROM test + | LIMIT 5 BY made_up_attr * 2 + """, defaultAnalyzer, VerificationException.class), containsString("Unknown column [made_up_attr]")); + + assertThat( + error(""" + FROM test + | LIMIT -1 BY languages + """, defaultAnalyzer, ParsingException.class), + containsString("value of [LIMIT -1 BY languages] must be a non negative integer, found value [-1] type [integer]") + ); + + assertThat(error(""" + FROM test + | LIMIT -1 * 42 BY languages + """, defaultAnalyzer, ParsingException.class), containsString("mismatched input '*'")); + } + private void query(String query) { query(query, defaultAnalyzer); } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/datasources/SplitDiscoveryPhaseTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/datasources/SplitDiscoveryPhaseTests.java index d32d764e139df..bb496d19eca82 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/datasources/SplitDiscoveryPhaseTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/datasources/SplitDiscoveryPhaseTests.java @@ -54,7 +54,7 @@ public void testExternalSourceExecGetsSplitsAttached() { public void testNoExternalSourceUnchanged() { PhysicalPlan leaf = createExternalSourceExec(FileSet.UNRESOLVED, "parquet"); - LimitExec limit = new LimitExec(SRC, leaf, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, leaf, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); Map factories = Map.of("parquet", testFactory(new FileSplitProvider())); @@ -85,7 +85,7 @@ public void testMultipleExternalSourcesEachGetOwnSplits() { ExternalSourceExec exec1 = createExternalSourceExec(fileSet1, "parquet"); ExternalSourceExec exec2 = createExternalSourceExec(fileSet2, "csv"); - LimitExec limit = new LimitExec(SRC, exec1, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, exec1, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); Map factories = Map.of( "parquet", @@ -173,7 +173,7 @@ public void testNestedFiltersAccumulateForDescendantSource() { public void testNoFiltersWhenNoFilterExecInPlan() { FileSet fileSet = createFileSet(2); ExternalSourceExec exec = createExternalSourceExec(fileSet, "parquet"); - LimitExec limit = new LimitExec(SRC, exec, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, exec, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); RecordingSplitProvider recorder = new RecordingSplitProvider(); Map factories = Map.of("parquet", testFactory(recorder)); diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java index a47c86ad60fb0..553e99de94fab 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java @@ -128,10 +128,12 @@ import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; /** @@ -2433,6 +2435,7 @@ public PhysicalPlan rule(PhysicalPlan plan, LocalPhysicalOptimizerContext contex plan.source(), limit.child(), new Literal(Source.EMPTY, 1000, INTEGER), + List.of(), randomEstimatedRowSize() ) { @Override @@ -2512,6 +2515,68 @@ public void testTopNUsesSortedInputFromDataNodes() { assertThat(sorts.getFirst().field().name(), equalTo("last_name")); } + public void testLimitByNotPushedToSource() { + var plan = plannerOptimizer.plan(""" + from test + | limit 10 by first_name + """); + + var limit = as(plan, LimitExec.class); + assertThat(limit.groupings(), empty()); + + var limitBy = as(limit.child(), LimitExec.class); + assertThat(limitBy.limit().fold(FoldContext.small()), is(10)); + assertThat(limitBy.groupings(), hasSize(1)); + assertThat(Expressions.names(limitBy.groupings()), contains("first_name")); + + // LIMIT BY must NOT push the limit into EsQueryExec + var sources = plan.collectLeaves().stream().filter(EsQueryExec.class::isInstance).toList(); + assertThat(sources, hasSize(1)); + assertThat(((EsQueryExec) sources.get(0)).limit(), is(nullValue())); + } + + public void testLimitByMultipleKeys() { + var plan = plannerOptimizer.plan(""" + from test + | limit 5 by first_name, last_name + """); + + var limit = as(plan, LimitExec.class); + assertThat(limit.groupings(), empty()); + + var limitBy = as(limit.child(), LimitExec.class); + assertThat(limitBy.limit().fold(FoldContext.small()), is(5)); + assertThat(limitBy.groupings(), hasSize(2)); + assertThat(Expressions.names(limitBy.groupings()), contains("first_name", "last_name")); + + var sources = plan.collectLeaves().stream().filter(EsQueryExec.class::isInstance).toList(); + assertThat(sources, hasSize(1)); + assertThat(((EsQueryExec) sources.get(0)).limit(), is(nullValue())); + } + + public void testLimitByWithFilter() { + var plan = plannerOptimizer.plan(""" + from test + | where salary > 1000 + | limit 10 by first_name + """); + + var limit = as(plan, LimitExec.class); + assertThat(limit.groupings(), empty()); + + var limitBy = as(limit.child(), LimitExec.class); + assertThat(limitBy.limit().fold(FoldContext.small()), is(10)); + assertThat(limitBy.groupings(), hasSize(1)); + assertThat(Expressions.names(limitBy.groupings()), contains("first_name")); + + // Filter should be pushed to source but limit should not + var sources = plan.collectLeaves().stream().filter(EsQueryExec.class::isInstance).toList(); + assertThat(sources, hasSize(1)); + var source = (EsQueryExec) sources.get(0); + assertThat(source.limit(), is(nullValue())); + assertThat(source.query(), is(not(nullValue()))); + } + private boolean isMultiTypeEsField(Expression e) { return e instanceof FieldAttribute fa && fa.field() instanceof MultiTypeEsField; } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java index 91e7687f2c64b..07cd9e9fcac3b 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java @@ -1084,8 +1084,15 @@ public void testPushdownLimitsPastLeftJoin() { var optimizedPlan = rule.apply(limit, logicalOptimizerCtx); var expectedPlan = join instanceof InlineJoin - ? new Limit(limit.source(), limit.limit(), join, false, false) - : new Limit(limit.source(), limit.limit(), join.replaceChildren(limit.replaceChild(join.left()), join.right()), true, false); + ? new Limit(limit.source(), limit.limit(), join, List.of(), false, false) + : new Limit( + limit.source(), + limit.limit(), + join.replaceChildren(limit.replaceChild(join.left()), join.right()), + List.of(), + true, + false + ); assertEquals(expectedPlan, optimizedPlan); @@ -10335,4 +10342,22 @@ public void testCombineOrderByThroughRegisteredDomain() { var registeredDomain = as(topN.child(), RegisteredDomain.class); as(registeredDomain.child(), EsRelation.class); } + + /** + *
{@code
+     * Limit[10000[INTEGER],[],false,false]
+     * \_LocalRelation[[_meta_field{f}#10, emp_no{f}#4, first_name{f}#5, gender{f}#6, hire_date{f}#11, job{f}#12, job.raw{f}#13, lang
+     * uages{f}#7, last_name{f}#8, long_noidx{f}#14, salary{f}#9],EMPTY]
+     * }
+ */ + public void testLimitByZero() { + var plan = plan(""" + FROM test + | LIMIT 0 BY emp_no + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(((Literal) defaultLimit.limit()).value(), equalTo(10000)); + as(defaultLimit.child(), LocalRelation.class); + } } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/PhysicalPlanOptimizerTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/PhysicalPlanOptimizerTests.java index 3c4103acd9098..8f02f1f56b494 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/PhysicalPlanOptimizerTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/PhysicalPlanOptimizerTests.java @@ -1597,6 +1597,149 @@ public void testPushLimitToSource() { assertThat(source.estimatedRowSize(), equalTo(allFieldRowSize + Integer.BYTES * 2)); } + public void testLimitByNotPushedToSource() { + var optimized = optimizedPlan(physicalPlan(""" + from test + | limit 10 by emp_no + """)); + + var leaves = optimized.collectLeaves(); + assertEquals(1, leaves.size()); + var source = as(leaves.get(0), EsQueryExec.class); + assertThat(source.limit(), nullValue()); + } + + public void testLimitByMultipleKeys() { + var optimized = optimizedPlan(physicalPlan(""" + from test + | limit 5 by first_name, last_name + """)); + + var defaultLimit = as(optimized, LimitExec.class); + assertThat(defaultLimit.groupings(), empty()); + + var limitBy = as(defaultLimit.child(), LimitExec.class); + assertThat(limitBy.limit().fold(FoldContext.small()), is(5)); + assertThat(limitBy.groupings(), hasSize(2)); + assertThat(names(limitBy.groupings()), contains("first_name", "last_name")); + + var exchange = asRemoteExchange(limitBy.child()); + + var sources = exchange.collectLeaves().stream().filter(EsQueryExec.class::isInstance).toList(); + assertThat(sources, hasSize(1)); + assertThat(((EsQueryExec) sources.get(0)).limit(), is(nullValue())); + } + + public void testLimitByAfterStats() { + var optimized = optimizedPlan(physicalPlan(""" + from test + | stats avg_salary = avg(salary) by first_name + | limit 5 by first_name + """)); + + // AVG is decomposed into SUM/COUNT with a ProjectExec + EvalExec on top + var project = as(optimized, ProjectExec.class); + var eval = as(project.child(), EvalExec.class); + + var defaultLimit = as(eval.child(), LimitExec.class); + assertThat(defaultLimit.groupings(), empty()); + + var limitBy = as(defaultLimit.child(), LimitExec.class); + assertThat(limitBy.limit().fold(FoldContext.small()), is(5)); + assertThat(limitBy.groupings(), hasSize(1)); + assertThat(names(limitBy.groupings()), contains("first_name")); + + var aggregate = as(limitBy.child(), AggregateExec.class); + assertThat(aggregate.groupings(), hasSize(1)); + } + + public void testLimitByAfterEval() { + var optimized = optimizedPlan(physicalPlan(""" + from test + | eval x = salary + 1 + | limit 10 by first_name + """)); + + // Eval is pushed above the limits by the logical optimizer + var eval = as(optimized, EvalExec.class); + + var defaultLimit = as(eval.child(), LimitExec.class); + assertThat(defaultLimit.groupings(), empty()); + + var limitBy = as(defaultLimit.child(), LimitExec.class); + assertThat(limitBy.limit().fold(FoldContext.small()), is(10)); + assertThat(limitBy.groupings(), hasSize(1)); + assertThat(names(limitBy.groupings()), contains("first_name")); + + var exchange = asRemoteExchange(limitBy.child()); + + var sources = exchange.collectLeaves().stream().filter(EsQueryExec.class::isInstance).toList(); + assertThat(sources, hasSize(1)); + assertThat(((EsQueryExec) sources.get(0)).limit(), is(nullValue())); + } + + public void testLimitByWithFilter() { + var optimized = optimizedPlan(physicalPlan(""" + from test + | where emp_no > 0 + | limit 10 by emp_no + """)); + + var leaves = optimized.collectLeaves(); + assertEquals(1, leaves.size()); + var source = as(leaves.get(0), EsQueryExec.class); + assertThat(source.limit(), nullValue()); + var rq = as(sv(source.query(), "emp_no"), RangeQueryBuilder.class); + assertThat(rq.fieldName(), equalTo("emp_no")); + assertThat(rq.from(), equalTo(0)); + assertThat(rq.includeLower(), equalTo(false)); + assertThat(rq.to(), nullValue()); + } + + public void testLimitByExpressionWithEval() { + var optimized = optimizedPlan(physicalPlan(""" + from test + | where emp_no > 0 + | limit 10 by emp_no * 2 + """)); + + // ReplaceLimitByExpressionWithEval wraps the plan in a Project to hide the synthetic eval attribute + var topProject = as(optimized, ProjectExec.class); + + var defaultLimit = as(topProject.child(), LimitExec.class); + assertThat(defaultLimit.groupings(), empty()); + + var limitBy = as(defaultLimit.child(), LimitExec.class); + assertThat(limitBy.limit().fold(FoldContext.small()), is(10)); + assertThat(limitBy.groupings(), hasSize(1)); + var groupKey = as(limitBy.groupings().get(0), ReferenceAttribute.class); + assertThat(groupKey.name(), equalTo("emp_no * 2")); + + var exchange = asRemoteExchange(limitBy.child()); + + // An EvalExec for the "emp_no * 2" expression must be present inside the exchange + assertThat(exchange.anyMatch(EvalExec.class::isInstance), is(true)); + + // Limit must NOT be pushed to source; the filter must be pushed + var sources = exchange.collectLeaves().stream().filter(EsQueryExec.class::isInstance).toList(); + assertThat(sources, hasSize(1)); + var source = (EsQueryExec) sources.get(0); + assertThat(source.limit(), is(nullValue())); + var rq = as(sv(source.query(), "emp_no"), RangeQueryBuilder.class); + assertThat(rq.fieldName(), equalTo("emp_no")); + } + + public void testLimitByZero() { + var plan = optimizedPlan(physicalPlan(""" + FROM test + | LIMIT 0 BY emp_no + """)); + + var limitExec = as(plan, LimitExec.class); + assertThat(((Literal) limitExec.limit()).value(), equalTo(10000)); + as(limitExec.child(), LocalSourceExec.class); + } + /** * Expected * EvalExec[[emp_no{f}#5 * 10[INTEGER] AS emp_no_10]] @@ -3414,7 +3557,7 @@ public void testVerifierOnDuplicateOutputAttributes() { ); assertThat( e.getMessage(), - containsString("Plan [LimitExec[1000[INTEGER],null]] optimized incorrectly due to duplicate output attribute emp_no{f}#") + containsString("Plan [LimitExec[1000[INTEGER],[],null]] optimized incorrectly due to duplicate output attribute emp_no{f}#") ); } @@ -3452,6 +3595,7 @@ public void testProjectAwayColumns() { Source.EMPTY, exchange, new Literal(Source.EMPTY, 10000, DataType.INTEGER), + List.of(), randomIntBetween(0, 1024) ); @@ -9551,6 +9695,7 @@ public PhysicalPlan rule(PhysicalPlan plan, PhysicalOptimizerContext context) { plan.source(), limit.child(), new Literal(Source.EMPTY, 1000, INTEGER), + List.of(), randomEstimatedRowSize() ) { @Override diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneLiteralsInLimitByTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneLiteralsInLimitByTests.java new file mode 100644 index 0000000000000..2418ce6ce7c1c --- /dev/null +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneLiteralsInLimitByTests.java @@ -0,0 +1,242 @@ +/* + * 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.optimizer.rules.logical; + +import org.elasticsearch.xpack.esql.core.expression.Expressions; +import org.elasticsearch.xpack.esql.core.expression.Literal; +import org.elasticsearch.xpack.esql.optimizer.AbstractLogicalPlanOptimizerTests; +import org.elasticsearch.xpack.esql.plan.logical.EsRelation; +import org.elasticsearch.xpack.esql.plan.logical.Eval; +import org.elasticsearch.xpack.esql.plan.logical.Limit; +import org.elasticsearch.xpack.esql.plan.logical.Project; + +import static org.elasticsearch.xpack.esql.EsqlTestUtils.as; +import static org.elasticsearch.xpack.esql.EsqlTestUtils.assertEvalFields; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.equalTo; + +public class PruneLiteralsInLimitByTests extends AbstractLogicalPlanOptimizerTests { + + /** + * A foldable eval alias used in LIMIT BY should be propagated by {@code PropagateEvalFoldables} + * and then pruned by {@code PruneLiteralsInLimitBy}, degenerating the LIMIT BY into a plain LIMIT. + * The two plain limits are then combined. The Eval remains because {@code x} is still in the output. + *
{@code
+     * Eval[[5[INTEGER] AS x]]
+     * \_Limit[1[INTEGER],[],false,false]
+     *   \_EsRelation[test][...]
+     * }
+ */ + public void testLimitByFoldableEvalAlias() { + var plan = plan(""" + FROM test + | EVAL x = 5 + | LIMIT 1 BY x + """); + + var eval = assertEvalFields(as(plan, Eval.class), new String[] { "x" }, new Object[] { 5 }); + var limit = as(eval.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(limit.groupings(), empty()); + as(limit.child(), EsRelation.class); + } + + /** + *
{@code
+     * Eval[[5[INTEGER] AS x#4, 7[INTEGER] AS y#7]]
+     * \_Limit[1[INTEGER],[],false,false]
+     *   \_EsRelation[test][_meta_field{f}#15, emp_no{f}#9, first_name{f}#10, g..]
+     * }
+ */ + public void testLimitByFoldableContiguousEvalAlias() { + var plan = plan(""" + FROM test + | EVAL x = 5 + | EVAL y = x + 2 + | LIMIT 1 BY y + """); + + var eval = assertEvalFields(as(plan, Eval.class), new String[] { "x", "y" }, new Object[] { 5, 7 }); + + var limit = as(eval.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(limit.groupings(), empty()); + as(limit.child(), EsRelation.class); + } + + /** + *
{@code
+     * Eval[[5[INTEGER] AS x#4, 7[INTEGER] AS y#7]]
+     * \_Limit[1[INTEGER],[],false,false]
+     *   \_EsRelation[test][_meta_field{f}#15, emp_no{f}#9, first_name{f}#10, g..]
+     * }
+ */ + public void testLimitByFoldableNonContiguousEvalAlias() { + var plan = plan(""" + FROM test + | EVAL x = 5 + | LIMIT 50 + | EVAL y = x + 2 + | LIMIT 1 BY y + """); + + var eval = assertEvalFields(as(plan, Eval.class), new String[] { "x", "y" }, new Object[] { 5, 7 }); + + var limit = as(eval.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(limit.groupings(), empty()); + as(limit.child(), EsRelation.class); + } + + /** + * A foldable eval alias mixed with a non-foldable attribute: the alias is propagated and pruned, + * the attribute grouping survives. + *
{@code
+     * Eval[[5[INTEGER] AS x]]
+     * \_Limit[10000[INTEGER],[],false,false]
+     *   \_Limit[1[INTEGER],[emp_no{f}#N],false,false]
+     *     \_EsRelation[test][...]
+     * }
+ */ + public void testFoldableEvalAliasAndAttributeMixed() { + var plan = plan(""" + FROM test + | EVAL x = 5 + | LIMIT 1 BY x, emp_no + """); + + var eval = assertEvalFields(as(plan, Eval.class), new String[] { "x" }, new Object[] { 5 }); + var defaultLimit = as(eval.child(), Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(limit.groupings().size(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + as(limit.child(), EsRelation.class); + } + + /** + * A foldable eval alias mixed with a foldable literal: both are pruned, degenerating to a plain LIMIT. + *
{@code
+     * Eval[[5[INTEGER] AS x]]
+     * \_Limit[1[INTEGER],[],false,false]
+     *   \_EsRelation[test][...]
+     * }
+ */ + public void testFoldableEvalAliasAndLiteralBothPruned() { + var plan = plan(""" + FROM test + | EVAL x = 5 + | LIMIT 1 BY x, 3 + """); + + var eval = assertEvalFields(as(plan, Eval.class), new String[] { "x" }, new Object[] { 5 }); + var limit = as(eval.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(limit.groupings(), empty()); + as(limit.child(), EsRelation.class); + } + + /** + * An expression composed of propagated foldable eval aliases should itself become foldable and be pruned. + * {@code x + x + 2} becomes {@code 5 + 5 + 2 = 12} after propagation. The expression grouping causes + * {@code ReplaceLimitByExpressionWithEval} to wrap in a Project to preserve the output schema. + *
{@code
+     * Project[[..., x{r}#N]]
+     * \_Eval[[5[INTEGER] AS x]]
+     *   \_Limit[1[INTEGER],[],false,false]
+     *     \_EsRelation[test][...]
+     * }
+ */ + public void testFoldableExpressionFromPropagatedEval() { + var plan = plan(""" + FROM test + | EVAL x = 5 + | LIMIT 1 BY x + x + 2 + """); + + var project = as(plan, Project.class); + var eval = assertEvalFields(as(project.child(), Eval.class), new String[] { "x" }, new Object[] { 5 }); + var limit = as(eval.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(limit.groupings(), empty()); + as(limit.child(), EsRelation.class); + } + + /** + * Contiguous LIMIT BY with a foldable eval alias: both degenerate to plain limits and get combined. + *
{@code
+     * Eval[[5[INTEGER] AS x]]
+     * \_Limit[1[INTEGER],[],false,false]
+     *   \_EsRelation[test][...]
+     * }
+ */ + public void testContiguousLimitByWithFoldableEval() { + var plan = plan(""" + FROM test + | EVAL x = 5 + | LIMIT 2 BY x + | LIMIT 1 BY x + """); + + var eval = assertEvalFields(as(plan, Eval.class), new String[] { "x" }, new Object[] { 5 }); + var limit = as(eval.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(limit.groupings(), empty()); + as(limit.child(), EsRelation.class); + } + + /** + * Mixing evals pointing to the same foldable and LIMIT BYs with the same canonical groupings + * should produce a LIMIT without groupings + *
{@code
+     * Eval[[5[INTEGER] AS x#4, 5[INTEGER] AS y#8]]
+     * \_Limit[1[INTEGER],[],false,false]
+     *   \_EsRelation[test][_meta_field{f}#16, emp_no{f}#10, first_name{f}#11, ..]
+     * }
+ */ + public void testNonContiguousLimitByWithFoldableEval() { + var plan = plan(""" + FROM test + | EVAL x = 5 + 24 + | LIMIT 2 BY x + | EVAL y = x + | LIMIT 1 BY y + """); + + var eval = assertEvalFields(as(plan, Eval.class), new String[] { "x", "y" }, new Object[] { 29, 29 }); + var limit = as(eval.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(limit.groupings(), empty()); + as(limit.child(), EsRelation.class); + } + + /** + * A foldable eval alias used in LIMIT BY that is not present in the output should be pruned + *
{@code
+     * Project[[emp_no{f}#7]]
+     * \_Limit[1[INTEGER],[],false,false]
+     *   \_EsRelation[test][_meta_field{f}#13, emp_no{f}#7, first_name{f}#8, ge..]
+     * }
+ */ + public void testEvalShouldBePruned() { + var plan = plan(""" + FROM test + | EVAL x = 5 + | LIMIT 1 BY x + | KEEP emp_no + """); + + var project = as(plan, Project.class); + var limit = as(project.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(limit.groupings(), empty()); + as(limit.child(), EsRelation.class); + } +} diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimitsTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimitsTests.java index 0a45e4d41f5de..8c5118043bd39 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimitsTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimitsTests.java @@ -10,12 +10,16 @@ import org.elasticsearch.common.lucene.BytesRefs; import org.elasticsearch.xpack.esql.core.expression.Alias; import org.elasticsearch.xpack.esql.core.expression.Attribute; +import org.elasticsearch.xpack.esql.core.expression.Expressions; import org.elasticsearch.xpack.esql.core.expression.FieldAttribute; +import org.elasticsearch.xpack.esql.core.expression.FoldContext; import org.elasticsearch.xpack.esql.core.expression.Literal; +import org.elasticsearch.xpack.esql.core.expression.NamedExpression; import org.elasticsearch.xpack.esql.expression.Order; import org.elasticsearch.xpack.esql.expression.function.scalar.convert.ToInteger; import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.Equals; import org.elasticsearch.xpack.esql.optimizer.AbstractLogicalPlanOptimizerTests; +import org.elasticsearch.xpack.esql.plan.logical.Aggregate; import org.elasticsearch.xpack.esql.plan.logical.Enrich; import org.elasticsearch.xpack.esql.plan.logical.EsRelation; import org.elasticsearch.xpack.esql.plan.logical.Eval; @@ -49,6 +53,8 @@ import static org.elasticsearch.xpack.esql.core.type.DataType.KEYWORD; import static org.elasticsearch.xpack.esql.core.type.DataType.TEXT; import static org.elasticsearch.xpack.esql.optimizer.LocalLogicalPlanOptimizerTests.relation; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; @@ -353,4 +359,250 @@ public void testPushDownLimitIntoForkWithRowAndUnboundedOrderBy() { assertThat(mvExpand.child(), instanceOf(LocalRelation.class)); } } + + /** + *
{@code
+     * Limit[10000[INTEGER],[],false,false]
+     * \_Limit[1[INTEGER],[emp_no{f}#6],false,false]
+     *   \_EsRelation[test][_meta_field{f}#12, emp_no{f}#6, first_name{f}#7, ge..]
+     * }
+ */ + public void testLimitByPruneIdenticalLimits() { + var plan = plan(""" + FROM test + | LIMIT 1 BY emp_no + | LIMIT 2 BY emp_no + | LIMIT 1 BY emp_no + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(((Literal) defaultLimit.limit()).value(), equalTo(10000)); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + } + + /** + *
{@code
+     * Limit[10000[INTEGER],[],false,false]
+     * \_Limit[1[INTEGER],[first_name{f}#6],false,false]
+     *   \_Limit[1[INTEGER],[emp_no{f}#5],false,false]
+     *     \_EsRelation[test][_meta_field{f}#11, emp_no{f}#5, first_name{f}#6, ge..]
+     * }
+ */ + public void testLimitByKeepDifferentGroupings() { + var plan = plan(""" + FROM test + | LIMIT 1 BY emp_no + | LIMIT 1 BY first_name + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(((Literal) defaultLimit.limit()).value(), equalTo(10000)); + var limit1 = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit1.limit()).value(), equalTo(1)); + assertThat(limit1.groupings().size(), equalTo(1)); + assertThat(Expressions.names(limit1.groupings()), contains("first_name")); + var limit2 = as(limit1.child(), Limit.class); + assertThat(((Literal) limit2.limit()).value(), equalTo(1)); + assertThat(limit2.groupings().size(), equalTo(1)); + assertThat(Expressions.names(limit2.groupings()), contains("emp_no")); + } + + /** + *
{@code
+     * Limit[2[INTEGER],[],false,false]
+     * \_Limit[2[INTEGER],[emp_no{f}#5],false,false]
+     *   \_Limit[2[INTEGER],[],false,false]
+     *     \_Limit[1[INTEGER],[emp_no{f}#5],false,false]
+     *       \_EsRelation[test][_meta_field{f}#11, emp_no{f}#5, first_name{f}#6, ge..]
+     * }
+ */ + public void testLimitByNotCombinedWhenSeparatedByPlainLimit() { + var plan = plan(""" + FROM test + | LIMIT 1 BY emp_no + | LIMIT 2 + | LIMIT 2 BY emp_no + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(((Literal) defaultLimit.limit()).value(), equalTo(2)); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(2)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + var limit2 = as(limit.child(), Limit.class); + assertThat(((Literal) limit2.limit()).value(), equalTo(2)); + assertThat(limit2.groupings(), empty()); + var limit3 = as(limit2.child(), Limit.class); + assertThat(((Literal) limit3.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit3.groupings()), contains("emp_no")); + } + + /** + *
{@code
+     * TopN[[Order[languages{f}#12,ASC,LAST]],10000[INTEGER],false]
+     * \_Aggregate[[languages{f}#12],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS c, languages{f}#12]]
+     *   \_Limit[2[INTEGER],[languages{f}#12],false,false]
+     *     \_TopN[[Order[emp_no{f}#9,ASC,LAST]],1000[INTEGER],false]
+     *       \_EsRelation[test][_meta_field{f}#15, emp_no{f}#9, first_name{f}#10, g..]
+     * }
+ */ + public void testLimitByNotCombinedWithTopN() { + var plan = plan(""" + FROM test + | SORT emp_no + | LIMIT 1000 + | LIMIT 2 BY languages + | STATS c = COUNT(*) BY languages + | SORT languages ASC NULLS LAST + """); + + var topN = as(plan, TopN.class); + assertThat(topN.limit().fold(FoldContext.small()), equalTo(10000)); + assertThat(orderNames(topN), contains("languages")); + var agg = as(topN.child(), Aggregate.class); + assertThat(Expressions.names(agg.groupings()), contains("languages")); + var limit = as(agg.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(2)); + assertThat(Expressions.names(limit.groupings()), contains("languages")); + var innerTopN = as(limit.child(), TopN.class); + assertThat(innerTopN.limit().fold(FoldContext.small()), equalTo(1000)); + assertThat(orderNames(innerTopN), contains("emp_no")); + as(innerTopN.child(), EsRelation.class); + } + + /** + * A grouped LIMIT (LIMIT BY) whose grouping references a field introduced by a local Enrich must not be + * pushed below the Enrich, because the field would not exist there. + *
{@code
+     * Limit[10000[INTEGER],[],false,false]
+     * \_Limit[5[INTEGER],[language_name{f}#N],false,false]
+     *   \_Enrich[ANY,languages_idx,first_name{f}#N,...]
+     *     \_EsRelation[test][...]
+     * }
+ */ + public void testLimitByNotPushedBelowLocalEnrichWhenGroupingReferencesEnrichField() { + var plan = plan(""" + FROM test + | ENRICH languages_idx ON first_name + | LIMIT 5 BY language_name + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(5)); + assertThat(Expressions.names(limit.groupings()), contains("language_name")); + var enrich = as(limit.child(), Enrich.class); + as(enrich.child(), EsRelation.class); + } + + /** + * A grouped LIMIT (LIMIT BY) whose grouping references a field introduced by a remote Enrich must not be + * duplicated below the Enrich, because the field would not exist there. + *
{@code
+     * Limit[10000[INTEGER],[],false,false]
+     * \_Limit[5[INTEGER],[language_name{f}#N],false,false]
+     *   \_Enrich[REMOTE,languages_remote,first_name{f}#N,...]
+     *     \_EsRelation[test][...]
+     * }
+ */ + public void testLimitByNotDuplicatedBelowRemoteEnrichWhenGroupingReferencesEnrichField() { + var plan = plan(""" + FROM test + | ENRICH _remote:languages_remote ON first_name + | LIMIT 5 BY language_name + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(5)); + assertThat(Expressions.names(limit.groupings()), contains("language_name")); + var enrich = as(limit.child(), Enrich.class); + as(enrich.child(), EsRelation.class); + } + + /** + * A grouped LIMIT (LIMIT BY) whose grouping references only source fields should still be pushed below + * a local Enrich, since the field is available in the Enrich's child. + *
{@code
+     * Limit[10000[INTEGER],[],false,false]
+     * \_Limit[5[INTEGER],[emp_no{f}#6, language_name{r}#20],false,false]
+     *   \_Enrich[ANY,languages_idx[KEYWORD],first_name{f}#7,{"match":{"indices":[],"match_field":"id","enrich_fields":["language_c
+     * ode","language_name"]}},{=languages_idx},[language_code{r}#19, language_name{r}#20]]
+     *     \_EsRelation[test][_meta_field{f}#12, emp_no{f}#6, first_name{f}#7, ge..]
+     * }
+ */ + public void testLimitByNotDuplicatedBelowRemoteEnrichWhenSomeGroupingReferencesEnrichField() { + var plan = plan(""" + FROM test + | ENRICH languages_idx ON first_name + | LIMIT 5 BY emp_no, language_name + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(5)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no", "language_name")); + var enrich = as(limit.child(), Enrich.class); + as(enrich.child(), EsRelation.class); + } + + /** + * A grouped LIMIT (LIMIT BY) whose grouping references only source fields should still be pushed below + * a local Enrich, since the field is available in the Enrich's child. + *
{@code
+     * Enrich[ANY,languages_idx,first_name{f}#N,...]
+     * \_Limit[10000[INTEGER],[],false,false]
+     *   \_Limit[5[INTEGER],[emp_no{f}#N],false,false]
+     *     \_EsRelation[test][...]
+     * }
+ */ + public void testLimitByPushedBelowLocalEnrichWhenGroupingOnSourceField() { + var plan = plan(""" + FROM test + | ENRICH languages_idx ON first_name + | LIMIT 5 BY emp_no + """); + + var enrich = as(plan, Enrich.class); + var defaultLimit = as(enrich.child(), Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(5)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + as(limit.child(), EsRelation.class); + } + + /** + * A grouped LIMIT (LIMIT BY) above a Fork must not be pushed into the fork branches. + */ + public void testLimitByNotPushedIntoForkBranches() { + var plan = plan(""" + FROM test + | FORK (WHERE emp_no > 100) (WHERE emp_no < 10) + | LIMIT 5 BY emp_no + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(5)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + var fork = as(limit.child(), Fork.class); + for (LogicalPlan branch : fork.children()) { + var project = as(branch, Project.class); + var eval = as(project.child(), Eval.class); + var branchLimit = as(eval.child(), Limit.class); + assertThat(branchLimit.groupings(), empty()); + as(branchLimit.child(), Filter.class); + } + } + + private static List orderNames(TopN topN) { + return topN.order().stream().map(o -> as(o.child(), NamedExpression.class).name()).toList(); + } } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/ReplaceLimitByExpressionWithEvalTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/ReplaceLimitByExpressionWithEvalTests.java new file mode 100644 index 0000000000000..285d2c8f587ac --- /dev/null +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/ReplaceLimitByExpressionWithEvalTests.java @@ -0,0 +1,356 @@ +/* + * 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.optimizer.rules.logical; + +import org.elasticsearch.xpack.esql.core.expression.Alias; +import org.elasticsearch.xpack.esql.core.expression.Expressions; +import org.elasticsearch.xpack.esql.core.expression.Literal; +import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Add; +import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Mul; +import org.elasticsearch.xpack.esql.optimizer.AbstractLogicalPlanOptimizerTests; +import org.elasticsearch.xpack.esql.plan.logical.EsRelation; +import org.elasticsearch.xpack.esql.plan.logical.Eval; +import org.elasticsearch.xpack.esql.plan.logical.Limit; +import org.elasticsearch.xpack.esql.plan.logical.Project; + +import static org.elasticsearch.xpack.esql.EsqlTestUtils.as; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.instanceOf; + +public class ReplaceLimitByExpressionWithEvalTests extends AbstractLogicalPlanOptimizerTests { + + /** + * Grouping on a plain attribute needs no rewrite. + *
{@code
+     * Limit[1000[INTEGER],[],false,false]
+     * \_Limit[1[INTEGER],[emp_no{f}#N],false,false]
+     *   \_EsRelation[test][...]
+     * }
+ */ + public void testAttributeGroupingUnchanged() { + var plan = plan(""" + FROM test + | LIMIT 1 BY emp_no + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + as(limit.child(), EsRelation.class); + } + + /** + * Multiple plain-attribute groupings need no rewrite. + *
{@code
+     * Limit[1000[INTEGER],[],false,false]
+     * \_Limit[2[INTEGER],[emp_no{f}#N, salary{f}#M],false,false]
+     *   \_EsRelation[test][...]
+     * }
+ */ + public void testMultipleAttributeGroupingsUnchanged() { + var plan = plan(""" + FROM test + | LIMIT 2 BY emp_no, salary + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(2)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no", "salary")); + as(limit.child(), EsRelation.class); + } + + /** + * A constant (foldable) grouping has no grouping effect and should be pruned, + * degenerating the LIMIT BY into a plain LIMIT. The two limits then get combined. + *
{@code
+     * Limit[1[INTEGER],[],false,false]
+     * \_EsRelation[test][...]
+     * }
+ */ + public void testAllFoldableGroupingsDegenerateToPlainLimit() { + var plan = plan(""" + FROM test + | LIMIT 1 BY 1 + """); + + var limit = as(plan, Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(limit.groupings(), empty()); + as(limit.child(), EsRelation.class); + } + + /** + * Multiple foldable groupings are all pruned, degenerating to a plain LIMIT. + *
{@code
+     * Limit[3[INTEGER],[],false,false]
+     * \_EsRelation[test][...]
+     * }
+ */ + public void testMultipleFoldableGroupingsDegenerateToPlainLimit() { + var plan = plan(""" + FROM test + | LIMIT 3 BY 1, "constant", false + """); + + var limit = as(plan, Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(3)); + assertThat(limit.groupings(), empty()); + as(limit.child(), EsRelation.class); + } + + /** + * Only foldable groupings are pruned; attribute groupings survive. + *
{@code
+     * Limit[1000[INTEGER],[],false,false]
+     * \_Limit[1[INTEGER],[emp_no{f}#N],false,false]
+     *   \_EsRelation[test][...]
+     * }
+ */ + public void testMixedFoldableAndAttributeGroupingsPruneFoldable() { + var plan = plan(""" + FROM test + | LIMIT 1 BY emp_no, 1 + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + as(limit.child(), EsRelation.class); + } + + /** + * A non-attribute expression grouping is extracted into an Eval and the output schema is + * preserved with a wrapping Project. + *
{@code
+     * Project[[emp_no{f}#N]]
+     * \_Limit[1000[INTEGER],[],false,false]
+     *   \_Limit[1[INTEGER],[emp_no + 5{r}#M],false,false]
+     *     \_Eval[[emp_no{f}#N + 5[INTEGER] AS emp_no + 5#M]]
+     *       \_EsRelation[test][...]
+     * }
+ */ + public void testSingleExpressionMovedToEval() { + var plan = plan(""" + FROM test + | KEEP emp_no + | LIMIT 1 BY emp_no + 5 + """); + + var project = as(plan, Project.class); + assertThat(Expressions.names(project.projections()), contains("emp_no")); + var defaultLimit = as(project.child(), Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no + 5")); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(1)); + var alias = as(eval.fields().getFirst(), Alias.class); + assertThat(alias.name(), equalTo("emp_no + 5")); + as(alias.child(), Add.class); + as(eval.child(), EsRelation.class); + } + + /** + * Multiple non-attribute expression groupings are all extracted into a single Eval. + *
{@code
+     * Project[[emp_no{f}#N, salary{f}#M]]
+     * \_Limit[1000[INTEGER],[],false,false]
+     *   \_Limit[1[INTEGER],[emp_no + 5{r}#A, salary * 2{r}#B],false,false]
+     *     \_Eval[[emp_no{f}#N + 5[INTEGER] AS emp_no + 5#A, salary{f}#M * 2[INTEGER] AS salary * 2#B]]
+     *       \_EsRelation[test][...]
+     * }
+ */ + public void testMultipleExpressionsMovedToEval() { + var plan = plan(""" + FROM test + | KEEP emp_no, salary + | LIMIT 1 BY emp_no + 5, salary * 2 + """); + + var project = as(plan, Project.class); + assertThat(Expressions.names(project.projections()), contains("emp_no", "salary")); + var defaultLimit = as(project.child(), Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no + 5", "salary * 2")); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(2)); + var alias0 = as(eval.fields().get(0), Alias.class); + assertThat(alias0.name(), equalTo("emp_no + 5")); + as(alias0.child(), Add.class); + var alias1 = as(eval.fields().get(1), Alias.class); + assertThat(alias1.name(), equalTo("salary * 2")); + as(alias1.child(), Mul.class); + as(eval.child(), EsRelation.class); + } + + /** + * When groupings mix plain attributes and expressions, only the expressions are extracted to Eval. + *
{@code
+     * Project[[emp_no{f}#N, salary{f}#M]]
+     * \_Limit[1000[INTEGER],[],false,false]
+     *   \_Limit[1[INTEGER],[emp_no{f}#N, salary * 2{r}#A],false,false]
+     *     \_Eval[[salary{f}#M * 2[INTEGER] AS salary * 2#A]]
+     *       \_EsRelation[test][...]
+     * }
+ */ + public void testMixedAttributeAndExpressionGroupings() { + var plan = plan(""" + FROM test + | KEEP emp_no, salary + | LIMIT 1 BY emp_no, salary * 2 + """); + + var project = as(plan, Project.class); + assertThat(Expressions.names(project.projections()), contains("emp_no", "salary")); + var defaultLimit = as(project.child(), Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no", "salary * 2")); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(1)); + var alias = as(eval.fields().getFirst(), Alias.class); + assertThat(alias.name(), equalTo("salary * 2")); + as(alias.child(), Mul.class); + as(eval.child(), EsRelation.class); + } + + /** + * Foldable groupings are pruned and the surviving expression grouping is extracted to Eval. + *
{@code
+     * Project[[emp_no{f}#N]]
+     * \_Limit[1000[INTEGER],[],false,false]
+     *   \_Limit[1[INTEGER],[emp_no + 5{r}#M],false,false]
+     *     \_Eval[[emp_no{f}#N + 5[INTEGER] AS emp_no + 5#M]]
+     *       \_EsRelation[test][...]
+     * }
+ */ + public void testFoldableGroupingPrunedAndExpressionExtracted() { + var plan = plan(""" + FROM test + | KEEP emp_no + | LIMIT 1 BY emp_no + 5, 1 + """); + + var project = as(plan, Project.class); + assertThat(Expressions.names(project.projections()), contains("emp_no")); + var defaultLimit = as(project.child(), Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no + 5")); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(1)); + var alias = as(eval.fields().getFirst(), Alias.class); + assertThat(alias.name(), equalTo("emp_no + 5")); + as(alias.child(), Add.class); + as(eval.child(), EsRelation.class); + } + + /** + * All foldable groupings pruned, only attribute grouping survives. No Eval needed. + *
{@code
+     * Limit[1000[INTEGER],[],false,false]
+     * \_Limit[1[INTEGER],[emp_no{f}#N],false,false]
+     *   \_EsRelation[test][...]
+     * }
+ */ + public void testFoldableGroupingPrunedAttributeSurvives() { + var plan = plan(""" + FROM test + | LIMIT 1 BY emp_no, 1, false + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + as(limit.child(), EsRelation.class); + } + + /** + * An eval alias used alongside an expression in LIMIT BY: {@code x} is already an attribute + * and left alone, while {@code salary * 2} is extracted into a synthetic Eval. + * The optimizer merges the user Eval and the synthetic Eval into a single node. + *
{@code
+     * Project[[_meta_field{f}#N, emp_no{f}#M, ..., x{r}#A]]
+     * \_Limit[10000[INTEGER],[],false,false]
+     *   \_Limit[1[INTEGER],[x{r}#A, salary * 2{r}#B],false,false]
+     *     \_Eval[[emp_no{f}#M + 5[INTEGER] AS x, salary{f}#M * 2[INTEGER] AS salary * 2#B]]
+     *       \_EsRelation[test][...]
+     * }
+ */ + public void testEvalAliasAndExpressionMixedInLimitBy() { + var plan = plan(""" + FROM test + | EVAL x = emp_no + 5 + | LIMIT 1 BY x, salary * 2 + """); + + var project = as(plan, Project.class); + var defaultLimit = as(project.child(), Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("x", "salary * 2")); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(2)); + var xAlias = as(eval.fields().get(0), Alias.class); + assertThat(xAlias.name(), equalTo("x")); + assertThat(xAlias.child(), instanceOf(Add.class)); + var salaryAlias = as(eval.fields().get(1), Alias.class); + assertThat(salaryAlias.name(), equalTo("salary * 2")); + assertThat(salaryAlias.child(), instanceOf(Mul.class)); + as(eval.child(), EsRelation.class); + } + + /** + * Foldable grouping pruned, attribute and expression groupings survive. + *
{@code
+     * Project[[emp_no{f}#N, salary{f}#M]]
+     * \_Limit[1000[INTEGER],[],false,false]
+     *   \_Limit[1[INTEGER],[emp_no{f}#N, salary * 2{r}#A],false,false]
+     *     \_Eval[[salary{f}#M * 2[INTEGER] AS salary * 2#A]]
+     *       \_EsRelation[test][...]
+     * }
+ */ + public void testFoldableAttributeAndExpressionGroupingsMixed() { + var plan = plan(""" + FROM test + | KEEP emp_no, salary + | LIMIT 1 BY emp_no, salary * 2, 1 + """); + + var project = as(plan, Project.class); + assertThat(Expressions.names(project.projections()), contains("emp_no", "salary")); + var defaultLimit = as(project.child(), Limit.class); + assertThat(defaultLimit.groupings(), empty()); + var limit = as(defaultLimit.child(), Limit.class); + assertThat(((Literal) limit.limit()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no", "salary * 2")); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(1)); + var alias = as(eval.fields().getFirst(), Alias.class); + assertThat(alias.name(), equalTo("salary * 2")); + as(alias.child(), Mul.class); + as(eval.child(), EsRelation.class); + } +} diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/PushLimitToExternalSourceTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/PushLimitToExternalSourceTests.java index bb1a2739eb9d8..474f1984e0037 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/PushLimitToExternalSourceTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/PushLimitToExternalSourceTests.java @@ -33,7 +33,7 @@ public void testLimitPushedToExternalSource() { ExternalSourceExec ext = externalSource(); assertEquals(FormatReader.NO_LIMIT, ext.pushedLimit()); - LimitExec limitExec = new LimitExec(Source.EMPTY, ext, literal(10), null); + LimitExec limitExec = new LimitExec(Source.EMPTY, ext, literal(10), List.of(), null); PhysicalPlan result = applyRule(limitExec); assertThat(result, instanceOf(LimitExec.class)); @@ -45,8 +45,8 @@ public void testLimitPushedToExternalSource() { public void testLimitNotPushedToNonExternalSource() { ExternalSourceExec ext = externalSource(); - LimitExec innerLimit = new LimitExec(Source.EMPTY, ext, literal(100), null); - LimitExec outerLimit = new LimitExec(Source.EMPTY, innerLimit, literal(10), null); + LimitExec innerLimit = new LimitExec(Source.EMPTY, ext, literal(100), List.of(), null); + LimitExec outerLimit = new LimitExec(Source.EMPTY, innerLimit, literal(10), List.of(), null); PhysicalPlan result = applyRule(outerLimit); 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 50f7c25c67ff2..3dc2836b39a6b 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 @@ -135,6 +135,7 @@ import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.everyItem; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; @@ -1082,6 +1083,78 @@ public void testBasicLimitCommand() { assertThat(limit.children().get(0).children().get(0), instanceOf(UnresolvedRelation.class)); } + public void testLimitBy() { + LogicalPlan plan = query(""" + FROM foo + | SORT @timestamp DESC + | LIMIT 10 BY hostname, @timestamp / 10 + """); + assertThat(plan, instanceOf(Limit.class)); + Limit limit = (Limit) plan; + assertThat(limit.limit(), instanceOf(Literal.class)); + assertThat(((Literal) limit.limit()).value(), equalTo(10)); + + assertThat(limit.groupings().size(), equalTo(2)); + assertThat(limit.groupings().get(0), instanceOf(UnresolvedAttribute.class)); + assertThat(((UnresolvedAttribute) limit.groupings().get(0)).name(), equalTo("hostname")); + assertThat(limit.groupings().get(1), instanceOf(Alias.class)); + Alias divAlias = (Alias) limit.groupings().get(1); + assertThat(divAlias.child(), instanceOf(Div.class)); + Div divExpr = (Div) divAlias.child(); + assertThat(divExpr.left(), instanceOf(UnresolvedAttribute.class)); + assertThat(((UnresolvedAttribute) divExpr.left()).name(), equalTo("@timestamp")); + assertThat(divExpr.right(), instanceOf(Literal.class)); + assertThat(((Literal) divExpr.right()).value(), equalTo(10)); + + assertThat(limit.child(), instanceOf(OrderBy.class)); + OrderBy orderBy = (OrderBy) limit.child(); + assertThat(orderBy.expressionsResolved(), equalTo(false)); + + var orders = orderBy.order(); + assertThat(orders.size(), equalTo(1)); + assertThat(orders.getFirst(), instanceOf(Order.class)); + Expression order = orders.getFirst().child(); + assertThat(order, instanceOf(UnresolvedAttribute.class)); + assertThat(((UnresolvedAttribute) order).name(), equalTo("@timestamp")); + + LogicalPlan relation = orderBy.child(); + assertThat(relation, instanceOf(UnresolvedRelation.class)); + assertThat(((UnresolvedRelation) relation).indexPattern().indexPattern(), equalTo("foo")); + } + + public void testLimitByQualifiedName() { + LogicalPlan plan = query(""" + FROM foo + | SORT @timestamp DESC + | LIMIT 10 BY [foo].[hostname] + """); + assertThat(plan, instanceOf(Limit.class)); + Limit limit = (Limit) plan; + assertThat(limit.limit(), instanceOf(Literal.class)); + assertThat(((Literal) limit.limit()).value(), equalTo(10)); + + assertThat(limit.groupings(), everyItem(instanceOf(UnresolvedAttribute.class))); + assertThat(limit.groupings().size(), equalTo(1)); + UnresolvedAttribute groupKey = (UnresolvedAttribute) limit.groupings().getFirst(); + assertThat(groupKey.qualifier(), equalTo("foo")); + assertThat(groupKey.name(), equalTo("hostname")); + + assertThat(limit.child(), instanceOf(OrderBy.class)); + OrderBy orderBy = (OrderBy) limit.child(); + assertThat(orderBy.expressionsResolved(), equalTo(false)); + + var orders = orderBy.order(); + assertThat(orders.size(), equalTo(1)); + assertThat(orders.getFirst(), instanceOf(Order.class)); + Expression order = orders.getFirst().child(); + assertThat(order, instanceOf(UnresolvedAttribute.class)); + assertThat(((UnresolvedAttribute) order).name(), equalTo("@timestamp")); + + LogicalPlan relation = orderBy.child(); + assertThat(relation, instanceOf(UnresolvedRelation.class)); + assertThat(((UnresolvedRelation) relation).indexPattern().indexPattern(), equalTo("foo")); + } + public void testBasicSortCommand() { LogicalPlan plan = query("from text | where true | sort a+b asc nulls first, x desc nulls last | sort y asc | sort z desc"); assertThat(plan, instanceOf(OrderBy.class)); diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/logical/LimitSerializationTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/logical/LimitSerializationTests.java index d762416db64d8..c8c50314c52b3 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/logical/LimitSerializationTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/logical/LimitSerializationTests.java @@ -8,35 +8,52 @@ package org.elasticsearch.xpack.esql.plan.logical; import org.elasticsearch.TransportVersion; +import org.elasticsearch.index.IndexMode; +import org.elasticsearch.test.TransportVersionUtils; import org.elasticsearch.xpack.esql.core.expression.Expression; +import org.elasticsearch.xpack.esql.core.expression.Literal; import org.elasticsearch.xpack.esql.core.tree.Source; +import org.elasticsearch.xpack.esql.core.type.DataType; import org.elasticsearch.xpack.esql.expression.function.FieldAttributeTests; import java.io.IOException; +import java.util.List; +import java.util.Map; public class LimitSerializationTests extends AbstractLogicalPlanSerializationTests { + private static Expression randomLimit() { + return new Literal(randomSource(), between(0, Integer.MAX_VALUE), DataType.INTEGER); + } + @Override protected Limit createTestInstance() { Source source = randomSource(); Expression limit = FieldAttributeTests.createFieldAttribute(0, false); LogicalPlan child = randomChild(0); - return new Limit(source, limit, child, randomBoolean(), randomBoolean()); + List groupings = randomGroupings(); + return new Limit(source, limit, child, groupings, randomBoolean(), randomBoolean()); } @Override protected Limit mutateInstance(Limit instance) throws IOException { Expression limit = instance.limit(); LogicalPlan child = instance.child(); + List groupings = instance.groupings(); boolean duplicated = instance.duplicated(); boolean local = instance.local(); - switch (randomIntBetween(0, 3)) { + switch (randomIntBetween(0, 4)) { case 0 -> limit = randomValueOtherThan(limit, () -> FieldAttributeTests.createFieldAttribute(0, false)); case 1 -> child = randomValueOtherThan(child, () -> randomChild(0)); - case 2 -> duplicated = duplicated == false; - case 3 -> local = local == false; + case 2 -> groupings = randomValueOtherThan(groupings, LimitSerializationTests::randomGroupings); + case 3 -> duplicated = duplicated == false; + case 4 -> local = local == false; default -> throw new IllegalStateException("Should never reach here"); } - return new Limit(instance.source(), limit, child, duplicated, local); + return new Limit(instance.source(), limit, child, groupings, duplicated, local); + } + + private static List randomGroupings() { + return randomList(0, 3, () -> FieldAttributeTests.createFieldAttribute(0, false)); } @Override @@ -52,4 +69,25 @@ protected Limit copyInstance(Limit instance, TransportVersion version) throws IO Limit deserializedCopy = super.copyInstance(instance, version); return deserializedCopy.withDuplicated(instance.duplicated()).withLocal(instance.local()); } + + public void testSerializationWithGroupingsOnOldVersion() { + TransportVersion oldVersion = TransportVersionUtils.randomVersionNotSupporting(Limit.ESQL_LIMIT_BY); + Source source = randomSource(); + Expression limit = randomLimit(); + LogicalPlan child = new EsRelation(Source.EMPTY, "idx", IndexMode.STANDARD, Map.of(), Map.of(), Map.of(), List.of()); + List groupings = randomList(1, 3, () -> FieldAttributeTests.createFieldAttribute(0, false)); + Limit instance = new Limit(source, limit, child, groupings, false, false); + Exception e = expectThrows(IllegalArgumentException.class, () -> copyInstance(instance, oldVersion)); + assertEquals("LIMIT BY is not supported by all nodes in the cluster", e.getMessage()); + } + + public void testSerializationWithoutGroupingsOnOldVersion() throws IOException { + TransportVersion oldVersion = TransportVersionUtils.randomVersionNotSupporting(Limit.ESQL_LIMIT_BY); + Source source = randomSource(); + Expression limit = randomLimit(); + LogicalPlan child = new EsRelation(Source.EMPTY, "idx", IndexMode.STANDARD, Map.of(), Map.of(), Map.of(), List.of()); + Limit instance = new Limit(source, limit, child, List.of(), false, false); + Limit deserialized = copyInstance(instance, oldVersion); + assertEquals(List.of(), deserialized.groupings()); + } } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/ExchangeSinkExecSerializationTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/ExchangeSinkExecSerializationTests.java index aa7b3f1152d6d..720f75e273725 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/ExchangeSinkExecSerializationTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/ExchangeSinkExecSerializationTests.java @@ -88,8 +88,9 @@ public void testManyTypeConflicts() throws IOException { * 1026343b - added time series field type to EsField #129649 * 1033593b - added qualifier back to FieldAttribute #132925 * 1033595b - added split indices to EsRelation #138396 + * 1033596b - added groupings to topN #143762 */ - testManyTypeConflicts(false, ByteSizeValue.ofBytes(1033595)); + testManyTypeConflicts(false, ByteSizeValue.ofBytes(1033596)); } /** @@ -111,8 +112,9 @@ public void testManyTypeConflictsWithParent() throws IOException { * 1971523b - added time series field type to EsField #129649 * 1986023b - added qualifier back to FieldAttribute #132925 * 1986025b - added split indices to EsRelation #138396 + * 1986026b - added groupings to topN #143762 */ - testManyTypeConflicts(true, ByteSizeValue.ofBytes(1986025)); + testManyTypeConflicts(true, ByteSizeValue.ofBytes(1986026)); } private void testManyTypeConflicts(boolean withParent, ByteSizeValue expected) throws IOException { @@ -136,13 +138,14 @@ public void testDeeplyNestedFields() throws IOException { * 43665025b - added time series field type to EsField #129649 * 43927169b - added qualifier back to FieldAttribute #132925 * 43927171b - added split indices to EsRelation #138396 + * 43927172b - added groupings to topN #143762 */ int depth = 6; int childrenPerLevel = 8; EsIndex index = deeplyNestedIndex(depth, childrenPerLevel); - testSerializePlanWithIndex(index, ByteSizeValue.ofBytes(43927171L)); + testSerializePlanWithIndex(index, ByteSizeValue.ofBytes(43927172L)); } /** @@ -161,13 +164,14 @@ public void testDeeplyNestedFieldsKeepOnlyOne() throws IOException { * 351b - added time series field type to EsField #129649 * 352b - added qualifier back to FieldAttribute #132925 * 354b - added split indices to EsRelation #138396 + * 355b - added groupings to topN #143762 */ int depth = 6; int childrenPerLevel = 9; EsIndex index = deeplyNestedIndex(depth, childrenPerLevel); - testSerializePlanWithIndex(index, ByteSizeValue.ofBytes(354), false); + testSerializePlanWithIndex(index, ByteSizeValue.ofBytes(355), false); } /** @@ -180,6 +184,7 @@ public void testIndexPatternTargetingMultipleIndices() throws IOException { * History: * 4996b - initial * 4998b - added split indices to EsRelation #138396 + * 4999b - added groupings to topN #143762 */ var index = EsIndexGenerator.esIndex( @@ -189,7 +194,7 @@ public void testIndexPatternTargetingMultipleIndices() throws IOException { .mapToObj(i -> "partial-.ds-index-service-logs-2025.01.01-000" + i) .collect(toMap(Function.identity(), i -> IndexMode.STANDARD)) ); - testSerializePlanWithIndex(index, ByteSizeValue.ofBytes(4998)); + testSerializePlanWithIndex(index, ByteSizeValue.ofBytes(4999)); } /** diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/LimitExecSerializationTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/LimitExecSerializationTests.java index 133f420fc3fc2..a794651db652b 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/LimitExecSerializationTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/LimitExecSerializationTests.java @@ -7,25 +7,35 @@ package org.elasticsearch.xpack.esql.plan.physical; +import org.elasticsearch.TransportVersion; +import org.elasticsearch.index.IndexMode; +import org.elasticsearch.test.TransportVersionUtils; import org.elasticsearch.xpack.esql.core.expression.Expression; import org.elasticsearch.xpack.esql.core.expression.Literal; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; +import org.elasticsearch.xpack.esql.expression.function.FieldAttributeTests; +import org.elasticsearch.xpack.esql.plan.logical.Limit; import java.io.IOException; +import java.util.List; public class LimitExecSerializationTests extends AbstractPhysicalPlanSerializationTests { public static LimitExec randomLimitExec(int depth) { Source source = randomSource(); PhysicalPlan child = randomChild(depth); Expression limit = randomLimit(); - return new LimitExec(source, child, limit, randomEstimatedRowSize()); + return new LimitExec(source, child, limit, randomGroupings(), randomEstimatedRowSize()); } private static Expression randomLimit() { return new Literal(randomSource(), between(0, Integer.MAX_VALUE), DataType.INTEGER); } + private static List randomGroupings() { + return randomList(0, 3, () -> FieldAttributeTests.createFieldAttribute(0, false)); + } + @Override protected LimitExec createTestInstance() { return randomLimitExec(0); @@ -35,18 +45,41 @@ protected LimitExec createTestInstance() { protected LimitExec mutateInstance(LimitExec instance) throws IOException { PhysicalPlan child = instance.child(); Expression limit = instance.limit(); + List groupings = instance.groupings(); Integer estimatedRowSize = instance.estimatedRowSize(); - switch (between(0, 2)) { + switch (between(0, 3)) { case 0 -> child = randomValueOtherThan(child, () -> randomChild(0)); case 1 -> limit = randomValueOtherThan(limit, LimitExecSerializationTests::randomLimit); - case 2 -> estimatedRowSize = randomValueOtherThan(estimatedRowSize, LimitExecSerializationTests::randomEstimatedRowSize); + case 2 -> groupings = randomValueOtherThan(groupings, LimitExecSerializationTests::randomGroupings); + case 3 -> estimatedRowSize = randomValueOtherThan(estimatedRowSize, LimitExecSerializationTests::randomEstimatedRowSize); default -> throw new AssertionError("Unexpected case"); } - return new LimitExec(instance.source(), child, limit, estimatedRowSize); + return new LimitExec(instance.source(), child, limit, groupings, estimatedRowSize); } @Override protected boolean alwaysEmptySource() { return true; } + + public void testSerializationWithGroupingsOnOldVersion() { + TransportVersion oldVersion = TransportVersionUtils.randomVersionNotSupporting(Limit.ESQL_LIMIT_BY); + Source source = randomSource(); + PhysicalPlan child = new EsSourceExec(Source.EMPTY, "idx", IndexMode.STANDARD, List.of(), null); + Expression limit = randomLimit(); + List groupings = randomList(1, 3, () -> FieldAttributeTests.createFieldAttribute(0, false)); + LimitExec instance = new LimitExec(source, child, limit, groupings, randomEstimatedRowSize()); + Exception e = expectThrows(IllegalArgumentException.class, () -> copyInstance(instance, oldVersion)); + assertEquals("LIMIT BY is not supported by all nodes in the cluster", e.getMessage()); + } + + public void testSerializationWithoutGroupingsOnOldVersion() throws IOException { + TransportVersion oldVersion = TransportVersionUtils.randomVersionNotSupporting(Limit.ESQL_LIMIT_BY); + Source source = randomSource(); + PhysicalPlan child = new EsSourceExec(Source.EMPTY, "idx", IndexMode.STANDARD, List.of(), null); + Expression limit = randomLimit(); + LimitExec instance = new LimitExec(source, child, limit, List.of(), randomEstimatedRowSize()); + LimitExec deserialized = copyInstance(instance, oldVersion); + assertEquals(List.of(), deserialized.groupings()); + } } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/AdaptiveStrategyTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/AdaptiveStrategyTests.java index 24bb81fcc434a..a829880824620 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/AdaptiveStrategyTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/AdaptiveStrategyTests.java @@ -81,7 +81,7 @@ public void testAggregationWithMultipleSplitsDistributes() { public void testLimitOnlyReturnsCoordinator() { PhysicalPlan source = createExternalSourceExec(); Literal limitExpr = new Literal(Source.EMPTY, 10, DataType.INTEGER); - PhysicalPlan planWithLimit = new LimitExec(Source.EMPTY, source, limitExpr, null); + PhysicalPlan planWithLimit = new LimitExec(Source.EMPTY, source, limitExpr, List.of(), null); ExternalDistributionContext context = new ExternalDistributionContext( planWithLimit, diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/CoordinatorOnlyStrategyTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/CoordinatorOnlyStrategyTests.java index b396d836de143..a11259d1fec27 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/CoordinatorOnlyStrategyTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/CoordinatorOnlyStrategyTests.java @@ -61,7 +61,7 @@ private static PhysicalPlan createPlan() { Map.of(), null ); - return new LimitExec(Source.EMPTY, source, new Literal(Source.EMPTY, 10, DataType.INTEGER), null); + return new LimitExec(Source.EMPTY, source, new Literal(Source.EMPTY, 10, DataType.INTEGER), List.of(), null); } private static List createSplits(int count) { diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/ExternalDistributionTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/ExternalDistributionTests.java index abe2aee476c46..758cb4c399822 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/ExternalDistributionTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/ExternalDistributionTests.java @@ -192,7 +192,7 @@ public void testResolveStrategyRoundRobin() { public void testCollapseExternalSourceExchangeRemovesExchange() { ExternalSourceExec externalSource = createExternalSourceExec(); ExchangeExec exchange = new ExchangeExec(SRC, externalSource); - LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); PhysicalPlan collapsed = ComputeService.collapseExternalSourceExchanges(limit); @@ -216,7 +216,7 @@ public void testCollapseExternalSourceExchangePreservesNonExternalExchanges() { public void testCollapseDoesNothingWhenNoExchanges() { ExternalSourceExec externalSource = createExternalSourceExec(); - LimitExec limit = new LimitExec(SRC, externalSource, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, externalSource, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); PhysicalPlan collapsed = ComputeService.collapseExternalSourceExchanges(limit); @@ -232,7 +232,7 @@ public void testCollapseWithSplitsOnExternalSource() { ); ExternalSourceExec externalSource = createExternalSourceExec().withSplits(splits); ExchangeExec exchange = new ExchangeExec(SRC, externalSource); - LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); PhysicalPlan collapsed = ComputeService.collapseExternalSourceExchanges(limit); @@ -247,7 +247,7 @@ public void testCollapseFragmentExecExchangeRemovesExchange() { ExternalRelation external = createExternalRelation(); FragmentExec fragment = new FragmentExec(external); ExchangeExec exchange = new ExchangeExec(SRC, fragment); - LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); PhysicalPlan collapsed = ComputeService.collapseExternalSourceExchanges(limit); diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/ExternalSourceDataNodeTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/ExternalSourceDataNodeTests.java index fb17cc1a8ff09..0b99a55139305 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/ExternalSourceDataNodeTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/ExternalSourceDataNodeTests.java @@ -51,7 +51,7 @@ public class ExternalSourceDataNodeTests extends ESTestCase { public void testDistributionResultNotDistributedWhenNoSplits() { ExternalSourceExec source = createExternalSourceExec(); - LimitExec limit = new LimitExec(SRC, source, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, source, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); List splits = collectExternalSplits(limit); assertTrue("No splits expected on source without splits", splits.isEmpty()); @@ -127,7 +127,7 @@ public void testExternalSourcePlanBreaksAtExchange() { List splits = createSplits(3); ExternalSourceExec source = createExternalSourceExec().withSplits(splits); ExchangeExec exchange = new ExchangeExec(SRC, source); - LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); var result = PlannerUtils.breakPlanBetweenCoordinatorAndDataNode(limit, null); @@ -294,7 +294,7 @@ public void testHandleExternalSourcePlanTransformationWithSinkExec() { public void testHandleExternalSourcePlanTransformationWithNestedPlan() { ExternalSourceExec source = createExternalSourceExec(); - LimitExec limit = new LimitExec(SRC, source, new Literal(SRC, 100, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, source, new Literal(SRC, 100, DataType.INTEGER), List.of(), null); ExchangeSinkExec sink = new ExchangeSinkExec(SRC, source.output(), false, limit); List splits = createSplits(3); @@ -367,7 +367,7 @@ public void testExternalDistributionPlanBreaksCorrectlyForDataNodes() { List splits = createSplits(6); ExternalSourceExec source = createExternalSourceExec().withSplits(splits); ExchangeExec exchange = new ExchangeExec(SRC, source); - LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 50, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 50, DataType.INTEGER), List.of(), null); var result = PlannerUtils.breakPlanBetweenCoordinatorAndDataNode(limit, null); PhysicalPlan coordinatorPlan = result.v1(); @@ -430,7 +430,7 @@ public void testCollapseExternalSourceExchangesPreservesSplits() { List splits = createSplits(3); ExternalSourceExec source = createExternalSourceExec().withSplits(splits); ExchangeExec exchange = new ExchangeExec(SRC, source); - LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, exchange, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); PhysicalPlan collapsed = ComputeService.collapseExternalSourceExchanges(limit); @@ -444,7 +444,7 @@ public void testCollapseExternalSourceExchangesPreservesSplits() { public void testCollapseExternalSourceExchangesLeavesNonExternalExchange() { ExternalSourceExec source = createExternalSourceExec(); - LimitExec limit = new LimitExec(SRC, source, new Literal(SRC, 10, DataType.INTEGER), null); + LimitExec limit = new LimitExec(SRC, source, new Literal(SRC, 10, DataType.INTEGER), List.of(), null); ExchangeExec exchange = new ExchangeExec(SRC, limit); PhysicalPlan collapsed = ComputeService.collapseExternalSourceExchanges(exchange); diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterConjunctionPushableAndNonPushable/load/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterConjunctionPushableAndNonPushable/load/local_physical_optimization.expected index 2f56604505197..fe6d6cbb42db2 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterConjunctionPushableAndNonPushable/load/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterConjunctionPushableAndNonPushable/load/local_physical_optimization.expected @@ -1,9 +1,9 @@ ProjectExec[[message{f}#0, does_not_exist{f}#1]] -\_LimitExec[1000[INTEGER],null] +\_LimitExec[1000[INTEGER],[],null] \_ExchangeExec[[message{f}#0, does_not_exist{f}#1],false] \_ProjectExec[[message{f}#0, does_not_exist{f}#1]] \_FieldExtractExec[message{f}#0]<[],[]> - \_LimitExec[1000[INTEGER],70] + \_LimitExec[1000[INTEGER],[],70] \_FilterExec[TOSTRING(does_not_exist{f}#1) == foo[KEYWORD]] \_FieldExtractExec[does_not_exist{f}#1]<[],[]> \_EsQueryExec[sample_data], indexMode[standard], [_doc{f}#2], limit[], sort[] estimatedRowSize[104] queryBuilderAndTags [[QueryBuilderAndTags[query={ @@ -19,4 +19,4 @@ ProjectExec[[message{f}#0, does_not_exist{f}#1]] }, "source" : "message == \"Connection error?\"@3:9" } -}, tags=[]]]] \ No newline at end of file +}, tags=[]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterDisjunctionPushableAndNonPushable/load/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterDisjunctionPushableAndNonPushable/load/local_physical_optimization.expected index b3ff975b660ee..e10a3aa306d2a 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterDisjunctionPushableAndNonPushable/load/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterDisjunctionPushableAndNonPushable/load/local_physical_optimization.expected @@ -1,8 +1,8 @@ ProjectExec[[message{f}#0, does_not_exist{f}#1]] -\_LimitExec[1000[INTEGER],null] +\_LimitExec[1000[INTEGER],[],null] \_ExchangeExec[[message{f}#0, does_not_exist{f}#1],false] \_ProjectExec[[message{f}#0, does_not_exist{f}#1]] - \_LimitExec[1000[INTEGER],120] + \_LimitExec[1000[INTEGER],[],120] \_FilterExec[message{f}#0 == Connection error?[KEYWORD] OR TOSTRING(does_not_exist{f}#1) == foo[KEYWORD]] \_FieldExtractExec[message{f}#0, does_not_exist{f}#1]<[],[]> - \_EsQueryExec[sample_data], indexMode[standard], [_doc{f}#2], limit[], sort[] estimatedRowSize[104] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] \ No newline at end of file + \_EsQueryExec[sample_data], indexMode[standard], [_doc{f}#2], limit[], sort[] estimatedRowSize[104] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterDisjunctionPushableAndNonPushable/nullify/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterDisjunctionPushableAndNonPushable/nullify/local_physical_optimization.expected index a089b04b205a2..72e0698462970 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterDisjunctionPushableAndNonPushable/nullify/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterDisjunctionPushableAndNonPushable/nullify/local_physical_optimization.expected @@ -1,5 +1,5 @@ ProjectExec[[message{f}#0, does_not_exist{f}#1]] -\_LimitExec[1000[INTEGER],null] +\_LimitExec[1000[INTEGER],[],null] \_ExchangeExec[[message{f}#0, does_not_exist{f}#1],false] \_ProjectExec[[message{f}#0, does_not_exist{f}#1]] \_FieldExtractExec[message{f}#0, does_not_exist{f}#1]<[],[]> @@ -16,4 +16,4 @@ ProjectExec[[message{f}#0, does_not_exist{f}#1]] }, "source" : "message == \"Connection error?\"@3:9" } -}, tags=[]]]] \ No newline at end of file +}, tags=[]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterNoPushdownWithUnmapped/load/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterNoPushdownWithUnmapped/load/local_physical_optimization.expected index 89814d11149b2..2bb67c9f2718a 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterNoPushdownWithUnmapped/load/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterNoPushdownWithUnmapped/load/local_physical_optimization.expected @@ -1,9 +1,9 @@ ProjectExec[[message{f}#0, does_not_exist{f}#1]] -\_LimitExec[1000[INTEGER],null] +\_LimitExec[1000[INTEGER],[],null] \_ExchangeExec[[message{f}#0, does_not_exist{f}#1],false] \_ProjectExec[[message{f}#0, does_not_exist{f}#1]] \_FieldExtractExec[message{f}#0]<[],[]> - \_LimitExec[1000[INTEGER],70] + \_LimitExec[1000[INTEGER],[],70] \_FilterExec[TOSTRING(does_not_exist{f}#1) == Connection error?[KEYWORD]] \_FieldExtractExec[does_not_exist{f}#1]<[],[]> - \_EsQueryExec[sample_data], indexMode[standard], [_doc{f}#2], limit[], sort[] estimatedRowSize[104] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] \ No newline at end of file + \_EsQueryExec[sample_data], indexMode[standard], [_doc{f}#2], limit[], sort[] estimatedRowSize[104] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterPushdownNoUnmapped/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterPushdownNoUnmapped/local_physical_optimization.expected index aa4715e3b0414..6456ab1afce73 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterPushdownNoUnmapped/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterPushdownNoUnmapped/local_physical_optimization.expected @@ -1,5 +1,5 @@ ProjectExec[[message{f}#0]] -\_LimitExec[1000[INTEGER],null] +\_LimitExec[1000[INTEGER],[],null] \_ExchangeExec[[message{f}#0],false] \_ProjectExec[[message{f}#0]] \_FieldExtractExec[message{f}#0]<[],[]> @@ -16,4 +16,4 @@ ProjectExec[[message{f}#0]] }, "source" : "message == \"Connection error?\"@3:9" } -}, tags=[]]]] \ No newline at end of file +}, tags=[]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterPushdownNoUnmappedFilterOnly/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterPushdownNoUnmappedFilterOnly/local_physical_optimization.expected index aa4715e3b0414..6456ab1afce73 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterPushdownNoUnmappedFilterOnly/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/golden_tests/PushdownGoldenTests/testFilterPushdownNoUnmappedFilterOnly/local_physical_optimization.expected @@ -1,5 +1,5 @@ ProjectExec[[message{f}#0]] -\_LimitExec[1000[INTEGER],null] +\_LimitExec[1000[INTEGER],[],null] \_ExchangeExec[[message{f}#0],false] \_ProjectExec[[message{f}#0]] \_FieldExtractExec[message{f}#0]<[],[]> @@ -16,4 +16,4 @@ ProjectExec[[message{f}#0]] }, "source" : "message == \"Connection error?\"@3:9" } -}, tags=[]]]] \ No newline at end of file +}, tags=[]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/bucket/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/bucket/local_physical_optimization.expected index 504e54c3064ee..574039f1b8cb5 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/bucket/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/bucket/local_physical_optimization.expected @@ -1,9 +1,9 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],SINGLE,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_EvalExec[[BUCKET(date{r}#4,P1D[DATE_PERIOD]) AS x#0]] \_MergeExec[[date{r}#4]] |_ProjectExec[[date{f}#5]] - | \_LimitExec[1000[INTEGER],null] + | \_LimitExec[1000[INTEGER],[],null] | \_ExchangeExec[[date{f}#5],false] | \_ProjectExec[[date{f}#5]] | \_FieldExtractExec[date{f}#5]<[],[]> @@ -22,7 +22,7 @@ LimitExec[1000[INTEGER],null] } }, tags=[]]]] \_ProjectExec[[date{f}#7]] - \_LimitExec[1000[INTEGER],null] + \_LimitExec[1000[INTEGER],[],null] \_ExchangeExec[[date{f}#7],false] \_ProjectExec[[date{f}#7]] \_FieldExtractExec[date{f}#7]<[],[]> @@ -33,4 +33,4 @@ LimitExec[1000[INTEGER],null] "lenient" : true } } -}, tags=[]]]] \ No newline at end of file +}, tags=[]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/date_trunc/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/date_trunc/local_physical_optimization.expected index 72dbdcc974f68..bfb2eb3cbc012 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/date_trunc/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/date_trunc/local_physical_optimization.expected @@ -1,9 +1,9 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],SINGLE,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_EvalExec[[DATETRUNC(P1D[DATE_PERIOD],date{r}#4) AS x#0]] \_MergeExec[[date{r}#4]] |_ProjectExec[[date{f}#5]] - | \_LimitExec[1000[INTEGER],null] + | \_LimitExec[1000[INTEGER],[],null] | \_ExchangeExec[[date{f}#5],false] | \_ProjectExec[[date{f}#5]] | \_FieldExtractExec[date{f}#5]<[],[]> @@ -22,7 +22,7 @@ LimitExec[1000[INTEGER],null] } }, tags=[]]]] \_ProjectExec[[date{f}#7]] - \_LimitExec[1000[INTEGER],null] + \_LimitExec[1000[INTEGER],[],null] \_ExchangeExec[[date{f}#7],false] \_ProjectExec[[date{f}#7]] \_FieldExtractExec[date{f}#7]<[],[]> @@ -33,4 +33,4 @@ LimitExec[1000[INTEGER],null] "lenient" : true } } -}, tags=[]]]] \ No newline at end of file +}, tags=[]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/round_to/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/round_to/local_physical_optimization.expected index 5c5cb8da952c2..6f2a68ea87206 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/round_to/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithFork/round_to/local_physical_optimization.expected @@ -1,9 +1,9 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],SINGLE,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_EvalExec[[ROUNDTO(date{r}#4,1697760000000[DATETIME],1697846400000[DATETIME],1697932800000[DATETIME],1698019200000[DATETIME]) AS x#0]] \_MergeExec[[date{r}#4]] |_ProjectExec[[date{f}#5]] - | \_LimitExec[1000[INTEGER],null] + | \_LimitExec[1000[INTEGER],[],null] | \_ExchangeExec[[date{f}#5],false] | \_ProjectExec[[date{f}#5]] | \_FieldExtractExec[date{f}#5]<[],[]> @@ -22,7 +22,7 @@ LimitExec[1000[INTEGER],null] } }, tags=[]]]] \_ProjectExec[[date{f}#7]] - \_LimitExec[1000[INTEGER],null] + \_LimitExec[1000[INTEGER],[],null] \_ExchangeExec[[date{f}#7],false] \_ProjectExec[[date{f}#7]] \_FieldExtractExec[date{f}#7]<[],[]> @@ -33,4 +33,4 @@ LimitExec[1000[INTEGER],null] "lenient" : true } } -}, tags=[]]]] \ No newline at end of file +}, tags=[]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/bucket/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/bucket/local_physical_optimization.expected index 37d5c04ccc89b..fef47fffa37f1 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/bucket/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/bucket/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16] @@ -8,4 +8,4 @@ LimitExec[1000[INTEGER],null] |_FieldExtractExec[integer{f}#7]<[],[]> | \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#9], limit[], sort[] estimatedRowSize[24] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] \_FragmentExec[filter=null, estimatedRowSize=0, reducer=[], fragment=[<> -EsRelation[languages_lookup][LOOKUP][language_code{f}#8]<>]] \ No newline at end of file +EsRelation[languages_lookup][LOOKUP][language_code{f}#8]<>]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/date_trunc/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/date_trunc/local_physical_optimization.expected index 37d5c04ccc89b..fef47fffa37f1 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/date_trunc/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/date_trunc/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16] @@ -8,4 +8,4 @@ LimitExec[1000[INTEGER],null] |_FieldExtractExec[integer{f}#7]<[],[]> | \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#9], limit[], sort[] estimatedRowSize[24] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] \_FragmentExec[filter=null, estimatedRowSize=0, reducer=[], fragment=[<> -EsRelation[languages_lookup][LOOKUP][language_code{f}#8]<>]] \ No newline at end of file +EsRelation[languages_lookup][LOOKUP][language_code{f}#8]<>]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/round_to/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/round_to/local_physical_optimization.expected index 37d5c04ccc89b..fef47fffa37f1 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/round_to/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketNotTransformToQueryAndTagsWithLookupJoin/round_to/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16] @@ -8,4 +8,4 @@ LimitExec[1000[INTEGER],null] |_FieldExtractExec[integer{f}#7]<[],[]> | \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#9], limit[], sort[] estimatedRowSize[24] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] \_FragmentExec[filter=null, estimatedRowSize=0, reducer=[], fragment=[<> -EsRelation[languages_lookup][LOOKUP][language_code{f}#8]<>]] \ No newline at end of file +EsRelation[languages_lookup][LOOKUP][language_code{f}#8]<>]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/bucket/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/bucket/local_physical_optimization.expected index 452b37138c025..88a902f96fb5a 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/bucket/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/bucket/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/date_trunc/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/date_trunc/local_physical_optimization.expected index b1eba3348e69d..286b2535ebe15 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/date_trunc/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/date_trunc/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/round_to/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/round_to/local_physical_optimization.expected index ee48e2b81fe3e..011167af7f36e 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/round_to/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTags/round_to/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/bucket/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/bucket/local_physical_optimization.expected index 452b37138c025..88a902f96fb5a 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/bucket/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/bucket/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/date_trunc/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/date_trunc/local_physical_optimization.expected index b1eba3348e69d..286b2535ebe15 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/date_trunc/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/date_trunc/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/round_to/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/round_to/local_physical_optimization.expected index ee48e2b81fe3e..011167af7f36e 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/round_to/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithEsFilter/round_to/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/bucket/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/bucket/local_physical_optimization.expected index 9bed443f7dbca..0af7abe26d39b 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/bucket/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/bucket/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[SUM(long{f}#1,true[BOOLEAN],PT0S[TIME_DURATION],compensated[KEYWORD]) AS sum(long)#2, COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#3, x{r}#0],FINAL,[x{r}#0, $$sum(long)$sum{r}#4, $$sum(long)$seen{r}#5, $$count(*)$count{r}#6, $$count(*)$seen{r}#7],null] \_ExchangeExec[[x{r}#0, $$sum(long)$sum{r}#4, $$sum(long)$seen{r}#5, $$count(*)$count{r}#6, $$count(*)$seen{r}#7],true] \_AggregateExec[[x{r}#0],[SUM(long{f}#1,true[BOOLEAN],PT0S[TIME_DURATION],compensated[KEYWORD]) AS sum(long)#2, COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#3, x{r}#0],INITIAL,[x{r}#0, $$sum(long)$sum{r}#8, $$sum(long)$seen{r}#9, $$count(*)$count{r}#10, $$count(*)$seen{r}#11],24] @@ -78,4 +78,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/date_trunc/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/date_trunc/local_physical_optimization.expected index 8a37befcc7c7e..ec589bf7de60a 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/date_trunc/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/date_trunc/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[SUM(long{f}#1,true[BOOLEAN],PT0S[TIME_DURATION],compensated[KEYWORD]) AS sum(long)#2, COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#3, x{r}#0],FINAL,[x{r}#0, $$sum(long)$sum{r}#4, $$sum(long)$seen{r}#5, $$count(*)$count{r}#6, $$count(*)$seen{r}#7],null] \_ExchangeExec[[x{r}#0, $$sum(long)$sum{r}#4, $$sum(long)$seen{r}#5, $$count(*)$count{r}#6, $$count(*)$seen{r}#7],true] \_AggregateExec[[x{r}#0],[SUM(long{f}#1,true[BOOLEAN],PT0S[TIME_DURATION],compensated[KEYWORD]) AS sum(long)#2, COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#3, x{r}#0],INITIAL,[x{r}#0, $$sum(long)$sum{r}#8, $$sum(long)$seen{r}#9, $$count(*)$count{r}#10, $$count(*)$seen{r}#11],24] @@ -78,4 +78,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/round_to/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/round_to/local_physical_optimization.expected index dd6350bd70a36..8769c5f37e51e 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/round_to/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithMultipleAggregates/round_to/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[SUM(long{f}#1,true[BOOLEAN],PT0S[TIME_DURATION],compensated[KEYWORD]) AS sum(long)#2, COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#3, x{r}#0],FINAL,[x{r}#0, $$sum(long)$sum{r}#4, $$sum(long)$seen{r}#5, $$count(*)$count{r}#6, $$count(*)$seen{r}#7],null] \_ExchangeExec[[x{r}#0, $$sum(long)$sum{r}#4, $$sum(long)$seen{r}#5, $$count(*)$count{r}#6, $$count(*)$seen{r}#7],true] \_AggregateExec[[x{r}#0],[SUM(long{f}#1,true[BOOLEAN],PT0S[TIME_DURATION],compensated[KEYWORD]) AS sum(long)#2, COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#3, x{r}#0],INITIAL,[x{r}#0, $$sum(long)$sum{r}#8, $$sum(long)$seen{r}#9, $$count(*)$count{r}#10, $$count(*)$seen{r}#11],24] @@ -78,4 +78,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/date_range/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/date_range/local_physical_optimization.expected index 6af84798b0c5b..6f39c6cbfe415 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/date_range/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/date_range/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -42,4 +42,4 @@ LimitExec[1000[INTEGER],null] "boost" : 0.0 } } -}, tags=[1698019200000]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[1698019200000]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/keyword_equality/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/keyword_equality/local_physical_optimization.expected index 8b039c4db5c27..bfd396fc5ebfd 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/keyword_equality/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/keyword_equality/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16] @@ -182,4 +182,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/keyword_match/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/keyword_match/local_physical_optimization.expected index 1783e8bca9fb9..1333450151226 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/keyword_match/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/bucket/keyword_match/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16] @@ -152,4 +152,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/date_range/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/date_range/local_physical_optimization.expected index 6af84798b0c5b..6f39c6cbfe415 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/date_range/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/date_range/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -42,4 +42,4 @@ LimitExec[1000[INTEGER],null] "boost" : 0.0 } } -}, tags=[1698019200000]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[1698019200000]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/keyword_equality/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/keyword_equality/local_physical_optimization.expected index 741c5cc853d00..32f7d0bf93caa 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/keyword_equality/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/keyword_equality/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16] @@ -182,4 +182,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/keyword_match/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/keyword_match/local_physical_optimization.expected index ba745f8603cf2..a6558a07b8c28 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/keyword_match/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/date_trunc/keyword_match/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16] @@ -152,4 +152,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/date_range/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/date_range/local_physical_optimization.expected index 6af84798b0c5b..6f39c6cbfe415 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/date_range/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/date_range/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -42,4 +42,4 @@ LimitExec[1000[INTEGER],null] "boost" : 0.0 } } -}, tags=[1698019200000]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[1698019200000]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/keyword_equality/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/keyword_equality/local_physical_optimization.expected index 3bb91af178169..44c43a09b7351 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/keyword_equality/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/keyword_equality/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16] @@ -182,4 +182,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/keyword_match/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/keyword_match/local_physical_optimization.expected index 0adf9b4716949..8aafc8dd10902 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/keyword_match/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithOtherPushdownFunctions/round_to/keyword_match/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],INITIAL,[x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5],16] @@ -152,4 +152,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/bucket/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/bucket/local_physical_optimization.expected index 54ec4005471fb..5f70eff05b56d 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/bucket/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/bucket/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],long{f}#1 > 10[INTEGER],PT0S[TIME_DURATION]) AS count(*) where long > 10#2, x{r}#0],FINAL,[x{r}#0, $$count(*) where long > 10$count{r}#3, $$count(*) where long > 10$seen{r}#4],null] \_ExchangeExec[[x{r}#0, $$count(*) where long > 10$count{r}#3, $$count(*) where long > 10$seen{r}#4],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],long{f}#1 > 10[INTEGER],PT0S[TIME_DURATION]) AS count(*) where long > 10#2, x{r}#0],INITIAL,[x{r}#0, $$count(*) where long > 10$count{r}#5, $$count(*) where long > 10$seen{r}#6],16] @@ -78,4 +78,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/date_trunc/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/date_trunc/local_physical_optimization.expected index 8665d69bc4af1..d8a0a21509e67 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/date_trunc/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/date_trunc/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],long{f}#1 > 10[INTEGER],PT0S[TIME_DURATION]) AS count(*) where long > 10#2, x{r}#0],FINAL,[x{r}#0, $$count(*) where long > 10$count{r}#3, $$count(*) where long > 10$seen{r}#4],null] \_ExchangeExec[[x{r}#0, $$count(*) where long > 10$count{r}#3, $$count(*) where long > 10$seen{r}#4],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],long{f}#1 > 10[INTEGER],PT0S[TIME_DURATION]) AS count(*) where long > 10#2, x{r}#0],INITIAL,[x{r}#0, $$count(*) where long > 10$count{r}#5, $$count(*) where long > 10$seen{r}#6],16] @@ -78,4 +78,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/round_to/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/round_to/local_physical_optimization.expected index d59fd1a30f5dc..b499243f28803 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/round_to/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testDateTruncBucketTransformToQueryAndTagsWithWhereInsideAggregation/round_to/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],long{f}#1 > 10[INTEGER],PT0S[TIME_DURATION]) AS count(*) where long > 10#2, x{r}#0],FINAL,[x{r}#0, $$count(*) where long > 10$count{r}#3, $$count(*) where long > 10$seen{r}#4],null] \_ExchangeExec[[x{r}#0, $$count(*) where long > 10$count{r}#3, $$count(*) where long > 10$seen{r}#4],true] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],long{f}#1 > 10[INTEGER],PT0S[TIME_DURATION]) AS count(*) where long > 10#2, x{r}#0],INITIAL,[x{r}#0, $$count(*) where long > 10$count{r}#5, $$count(*) where long > 10$seen{r}#6],16] @@ -78,4 +78,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]] \ No newline at end of file +}, tags=[null]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testForkWithStatsCountStarDateTrunc/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testForkWithStatsCountStarDateTrunc/local_physical_optimization.expected index 39dfd81cf4915..90938d70fc820 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testForkWithStatsCountStarDateTrunc/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testForkWithStatsCountStarDateTrunc/local_physical_optimization.expected @@ -1,8 +1,8 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_MergeExec[[x{r}#0, y{r}#1, hd{r}#2, _fork{r}#3]] |_ProjectExec[[x{r}#4, y{r}#5, hd{r}#6, _fork{r}#7]] | \_EvalExec[[fork1[KEYWORD] AS _fork#7]] - | \_LimitExec[1000[INTEGER],null] + | \_LimitExec[1000[INTEGER],[],null] | \_AggregateExec[[hd{r}#6],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS x#4, MAX(long{f}#8,true[BOOLEAN],PT0S[TIME_DURATION]) AS y#5, hd{r}#6],FINAL,[hd{r}#6, $$x$count{r}#9, $$x$seen{r}#10, $$y$max{r}#11, $$y$seen{r}#12],null] | \_ExchangeExec[[hd{r}#6, $$x$count{r}#9, $$x$seen{r}#10, $$y$max{r}#11, $$y$seen{r}#12],true] | \_AggregateExec[[hd{r}#6],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS x#4, MAX(long{f}#8,true[BOOLEAN],PT0S[TIME_DURATION]) AS y#5, hd{r}#6],INITIAL,[hd{r}#6, $$x$count{r}#13, $$x$seen{r}#14, $$y$max{r}#15, $$y$seen{r}#16],24] @@ -85,11 +85,11 @@ LimitExec[1000[INTEGER],null] }, tags=[null]]]] \_ProjectExec[[x{r}#19, y{r}#20, hd{r}#21, _fork{r}#22]] \_EvalExec[[fork2[KEYWORD] AS _fork#22]] - \_LimitExec[1000[INTEGER],null] + \_LimitExec[1000[INTEGER],[],null] \_AggregateExec[[hd{r}#21],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS x#19, MIN(long{f}#23,true[BOOLEAN],PT0S[TIME_DURATION]) AS y#20, hd{r}#21],FINAL,[hd{r}#21, $$x$count{r}#24, $$x$seen{r}#25, $$y$min{r}#26, $$y$seen{r}#27],null] \_ExchangeExec[[hd{r}#21, $$x$count{r}#24, $$x$seen{r}#25, $$y$min{r}#26, $$y$seen{r}#27],true] \_AggregateExec[[hd{r}#21],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS x#19, MIN(long{f}#23,true[BOOLEAN],PT0S[TIME_DURATION]) AS y#20, hd{r}#21],INITIAL,[hd{r}#21, $$x$count{r}#28, $$x$seen{r}#29, $$y$min{r}#30, $$y$seen{r}#31],24] \_FieldExtractExec[long{f}#23]<[],[]> \_EvalExec[[DATETRUNC(P2D[DATE_PERIOD],date{f}#32) AS hd#21]] \_FieldExtractExec[date{f}#32]<[],[]> - \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#33], limit[], sort[] estimatedRowSize[28] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] \ No newline at end of file + \_EsQueryExec[all_types], indexMode[standard], [_doc{f}#33], limit[], sort[] estimatedRowSize[28] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/byte/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/byte/local_physical_optimization.expected index 5315aaeb6b782..5d614934a14a5 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/byte/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/byte/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -68,4 +68,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/date/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/date/local_physical_optimization.expected index a917d136623a5..a73485cc2f526 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/date/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/date/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/date_nanos/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/date_nanos/local_physical_optimization.expected index 66b986835d508..1e5bfd95dc635 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/date_nanos/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/date_nanos/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -76,4 +76,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/double/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/double/local_physical_optimization.expected index d7f1b8f132836..307603b747efd 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/double/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/double/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -68,4 +68,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/float/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/float/local_physical_optimization.expected index 299660977cb4e..c393dc768ca95 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/float/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/float/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -68,4 +68,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/half_float/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/half_float/local_physical_optimization.expected index 7f6523fa91e37..ad425ddebfab8 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/half_float/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/half_float/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -68,4 +68,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/integer/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/integer/local_physical_optimization.expected index bd20ccd161980..afb6efcddc161 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/integer/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/integer/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -68,4 +68,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/long/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/long/local_physical_optimization.expected index cf3a620024a4e..f1dfc9697c5f1 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/long/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/long/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -68,4 +68,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/scaled_float/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/scaled_float/local_physical_optimization.expected index c980fac8998ca..5b13078f42ba4 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/scaled_float/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/scaled_float/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -68,4 +68,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/short/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/short/local_physical_optimization.expected index ad219641bde8c..02f6f64cfa881 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/short/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testRoundToTransformToQueryAndTags/short/local_physical_optimization.expected @@ -1,4 +1,4 @@ -LimitExec[1000[INTEGER],null] +LimitExec[1000[INTEGER],[],null] \_AggregateExec[[x{r}#0],[COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count(*)#1, x{r}#0],FINAL,[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],null] \_ExchangeExec[[x{r}#0, $$count(*)$count{r}#2, $$count(*)$seen{r}#3],true] \_FilterExec[$$count(*)$count{r}#4 > 0[LONG]] @@ -68,4 +68,4 @@ LimitExec[1000[INTEGER],null] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#0, $$count(*)$count{r}#4, $$count(*)$seen{r}#5], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testSubqueryWithCountStarAndDateTrunc/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testSubqueryWithCountStarAndDateTrunc/local_physical_optimization.expected index 9f3fe63e4a21f..c116c664916db 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testSubqueryWithCountStarAndDateTrunc/local_physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/SubstituteRoundToGoldenTests/testSubqueryWithCountStarAndDateTrunc/local_physical_optimization.expected @@ -1,5 +1,5 @@ ProjectExec[[x{r}#0, cnt{r}#1, date{r}#2]] -\_LimitExec[1000[INTEGER],null] +\_LimitExec[1000[INTEGER],[],null] \_MergeExec[[alias_integer{r}#3, boolean{r}#4, byte{r}#5, constant_keyword-foo{r}#6, date{r}#2, date_nanos{r}#7, dense_vector{r}#8, double{r}#9, float{r}#10, half_float{r}#11, integer{r}#12, ip{r}#13, keyword{r}#14, long{r}#15, scaled_float{r}#16, semantic_text{r}#17, short{r}#18, text{r}#19, unsigned_long{r}#20, version{r}#21, wildcard{r}#22, cnt{r}#1, x{r}#0]] |_ExchangeExec[[alias_integer{r}#23, boolean{f}#24, byte{f}#25, constant_keyword-foo{f}#26, date{f}#27, date_nanos{f}#28, dense_vector{f}#29, double{f}#30, float{f}#31, half_float{f}#32, integer{f}#33, ip{f}#34, keyword{f}#35, long{f}#36, scaled_float{f}#37, semantic_text{f}#38, short{f}#39, text{f}#40, unsigned_long{f}#41, version{f}#42, wildcard{f}#43, cnt{r}#44, x{r}#45],false] | \_ProjectExec[[alias_integer{r}#23, boolean{f}#24, byte{f}#25, constant_keyword-foo{f}#26, date{f}#27, date_nanos{f}#28, dense_vector{f}#29, double{f}#30, float{f}#31, half_float{f}#32, integer{f}#33, ip{f}#34, keyword{f}#35, long{f}#36, scaled_float{f}#37, semantic_text{f}#38, short{f}#39, text{f}#40, unsigned_long{f}#41, version{f}#42, wildcard{f}#43, cnt{r}#44, x{r}#45]] @@ -85,4 +85,4 @@ ProjectExec[[x{r}#0, cnt{r}#1, date{r}#2]] ], "boost" : 1.0 } -}, tags=[null]]]}], query[][x{r}#69, $$cnt$count{r}#73, $$cnt$seen{r}#74], limit[], \ No newline at end of file +}, tags=[null]]]}], query[][x{r}#69, $$cnt$count{r}#73, $$cnt$seen{r}#74], limit[], diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/plugin/golden_tests/LateMaterializationPlannerGoldenTests/testTopNThenStats/physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/plugin/golden_tests/LateMaterializationPlannerGoldenTests/testTopNThenStats/physical_optimization.expected index d520dec0664bd..e4849b1081dc5 100644 --- a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/plugin/golden_tests/LateMaterializationPlannerGoldenTests/testTopNThenStats/physical_optimization.expected +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/plugin/golden_tests/LateMaterializationPlannerGoldenTests/testTopNThenStats/physical_optimization.expected @@ -1,10 +1,10 @@ ProjectExec[[avg_salary{r}#0, count{r}#1]] \_EvalExec[[$$SUM$avg_salary$0{r$}#2 / $$COUNT$avg_salary$1{r$}#3 AS avg_salary#0]] - \_LimitExec[10000[INTEGER],null] + \_LimitExec[10000[INTEGER],[],null] \_AggregateExec[[],[SUM(salary{f}#4,true[BOOLEAN],PT0S[TIME_DURATION],compensated[KEYWORD]) AS $$SUM$avg_salary$0#2, COUNT(salary{f}#4,true[BOOLEAN],PT0S[TIME_DURATION]) AS $$COUNT$avg_salary$1#3, COUNT(*[KEYWORD],true[BOOLEAN],PT0S[TIME_DURATION]) AS count#1],SINGLE,[$$SUM$avg_salary$0$sum{r}#5, $$SUM$avg_salary$0$seen{r}#6, $$COUNT$avg_salary$1$count{r}#7, $$COUNT$avg_salary$1$seen{r}#8, $$count$count{r}#9, $$count$seen{r}#10],null] \_TopNExec[[Order[hire_date{f}#11,ASC,LAST]],20[INTEGER],null] \_ExchangeExec[[hire_date{f}#11, salary{f}#4],false] \_FragmentExec[filter=null, estimatedRowSize=0, reducer=[], fragment=[<> Project[[hire_date{f}#11, salary{f}#4]] \_TopN[[Order[hire_date{f}#11,ASC,LAST]],20[INTEGER],false] - \_EsRelation[employees][avg_worked_seconds{f}#12, birth_date{f}#13, emp_no{f}#14, first_name{f}#15, gender{f}#16, height{f}#17, height.float{f}#18, height.half_float{f}#19, height.scaled_float{f}#20, hire_date{f}#11, is_rehired{f}#21, job_positions{f}#22, languages{f}#23, languages.byte{f}#24, languages.long{f}#25, languages.short{f}#26, last_name{f}#27, salary{f}#4, salary_change{f}#28, salary_change.int{f}#29, salary_change.keyword{f}#30, salary_change.long{f}#31, still_hired{f}#32]<>]] \ No newline at end of file + \_EsRelation[employees][avg_worked_seconds{f}#12, birth_date{f}#13, emp_no{f}#14, first_name{f}#15, gender{f}#16, height{f}#17, height.float{f}#18, height.half_float{f}#19, height.scaled_float{f}#20, hire_date{f}#11, is_rehired{f}#21, job_positions{f}#22, languages{f}#23, languages.byte{f}#24, languages.long{f}#25, languages.short{f}#26, last_name{f}#27, salary{f}#4, salary_change{f}#28, salary_change.int{f}#29, salary_change.keyword{f}#30, salary_change.long{f}#31, still_hired{f}#32]<>]]