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 505dc1828a941..43f258064ae83 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 @@ -133,6 +133,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; @@ -230,6 +231,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; @@ -818,6 +820,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..3f51257951a13 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,274 @@ emp_no:integer 10004 10005 ; + +// +// LIMIT BY +// + +limitBy +required_capability: esql_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: esql_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: esql_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: esql_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: esql_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: esql_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: esql_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: esql_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: esql_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: esql_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: esql_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 +; + +limitByWithLookupJoin +required_capability: esql_limit_by +required_capability: join_lookup_v12 + +FROM employees +| WHERE emp_no IN (10001, 10002, 10003, 10004, 10005) +| EVAL language_code = languages +| LOOKUP JOIN languages_lookup_non_unique_key ON language_code +| SORT emp_no, language_code, language_name +| LIMIT 1000 +| LIMIT 2 BY emp_no +| KEEP emp_no, language_code, language_name +; + +emp_no:integer | language_code:integer | language_name:keyword +10001 | 2 | German +10001 | 2 | German +10002 | 5 | null +10003 | 4 | Quenya +10004 | 5 | null +10005 | 1 | English +10005 | 1 | English +; + +limitByShadowedNonJoinField +required_capability: esql_limit_by +required_capability: join_lookup_v12 + +FROM employees +| WHERE emp_no IN (10001, 10002, 10003, 10004, 10005) +| EVAL language_code = languages +| EVAL language_name = 2*salary +| LOOKUP JOIN languages_lookup_non_unique_key ON language_code +| SORT emp_no, language_code, language_name +| LIMIT 1000 +| LIMIT 2 BY language_name +| KEEP emp_no, language_code, language_name +; + +emp_no:integer | language_code:integer | language_name:keyword +10001 | 2 | German +10001 | 2 | German +10002 | 5 | null +10003 | 4 | Quenya +10004 | 5 | null +10005 | 1 | English +10005 | 1 | English +; + +limitByShadowedJoinField +required_capability: esql_limit_by +required_capability: join_lookup_v12 + +FROM employees +| WHERE emp_no IN (10001, 10002, 10003, 10004, 10005) +| EVAL language_code = languages +| LOOKUP JOIN languages_lookup_non_unique_key ON language_code +| SORT emp_no, language_code, language_name +| LIMIT 1000 +| LIMIT 2 BY language_code +| KEEP emp_no, language_code, language_name +; + +emp_no:integer | language_code:integer | language_name:keyword +10001 | 2 | German +10001 | 2 | German +10002 | 5 | null +10003 | 4 | Quenya +10004 | 5 | null +10005 | 1 | English +10005 | 1 | English +; diff --git a/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 b/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 index e60294212437e..513938703c9c2 100644 --- a/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 +++ b/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 @@ -225,7 +225,7 @@ limitCommand ; limitByGroupKey: - {this.isDevVersion()}? BY grouping=fields + {this.isDevVersion()}? BY booleanExpression (COMMA booleanExpression)* ; 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 9983373876a3d..6d3d923e1b397 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 @@ -2321,8 +2321,10 @@ public enum Cap { /** * LIMIT n BY expr1, expr2 support for retaining at most n docs per group. + * Enables the feature without a preceding SORT. + * */ - LIMIT_BY(Build.current().isSnapshot()), + ESQL_LIMIT_BY(Build.current().isSnapshot()), /** * Fix window validation in time-series aggregations when TBUCKET uses a numeric target bucket count. 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 d16dc56abbc5f..6c3b1c9c0f121 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 @@ -40,8 +40,10 @@ import org.elasticsearch.xpack.esql.plan.logical.LimitBy; 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.Subquery; +import org.elasticsearch.xpack.esql.plan.logical.UnaryPlan; import org.elasticsearch.xpack.esql.plan.logical.UnionAll; import org.elasticsearch.xpack.esql.plan.logical.promql.PromqlCommand; import org.elasticsearch.xpack.esql.telemetry.FeatureMetric; @@ -357,9 +359,20 @@ 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 LimitBy) { - failures.add(fail(plan, "LIMIT BY is not yet supported")); + if (plan instanceof LimitBy limitBy) { + LogicalPlan child = limitBy.child(); + while (child instanceof UnaryPlan unary) { + if (child instanceof OrderBy) { + failures.add(fail(limitBy, "SORT cannot be used before LIMIT BY")); + break; + } + if (child instanceof Limit) { + break; + } + child = unary.child(); + } } } 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 4b7f9208c320d..5274358a5ff65 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 @@ -188,6 +188,23 @@ 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); + if (left == null || right == null) { + throw new IllegalArgumentException("Unexpected null expression in list at index [" + i + "]"); + } + 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 2a79142680250..be9cb1703b781 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 @@ -38,11 +38,13 @@ 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; import org.elasticsearch.xpack.esql.optimizer.rules.logical.PruneUnusedIndexMode; import org.elasticsearch.xpack.esql.optimizer.rules.logical.PushDownAndCombineFilters; +import org.elasticsearch.xpack.esql.optimizer.rules.logical.PushDownAndCombineLimitBy; import org.elasticsearch.xpack.esql.optimizer.rules.logical.PushDownAndCombineLimits; import org.elasticsearch.xpack.esql.optimizer.rules.logical.PushDownAndCombineOrderBy; import org.elasticsearch.xpack.esql.optimizer.rules.logical.PushDownAndCombineSample; @@ -61,6 +63,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; @@ -183,6 +186,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() ); @@ -226,7 +230,9 @@ protected static Batch operators() { new PruneFilters(), new PruneColumns(), new PruneLiteralsInOrderBy(), + new PruneLiteralsInLimitBy(), new PushDownAndCombineLimits(), + new PushDownAndCombineLimitBy(), new PushLimitToKnn(), new PushDownAndCombineFilters(), new PushDownConjunctionsToKnnPrefilters(), 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..88a143d077a66 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.LimitBy; 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 LimitBy (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 LimitBy) { 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/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..c84b4c6f59d78 --- /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.LimitBy; +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(LimitBy limitBy) { + List newGroupings = new ArrayList<>(); + for (Expression g : limitBy.groupings()) { + Expression toCheck = g instanceof Alias as ? as.child() : g; + if (toCheck.foldable() == false) { + newGroupings.add(g); + } + } + + if (newGroupings.size() == limitBy.groupings().size()) { + return limitBy; + } + if (newGroupings.isEmpty()) { + return new Limit(limitBy.source(), limitBy.limitPerGroup(), limitBy.child()); + } + return new LimitBy(limitBy.source(), limitBy.limitPerGroup(), limitBy.child(), newGroupings, limitBy.duplicated()); + } +} diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimitBy.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimitBy.java new file mode 100644 index 0000000000000..36a21e3507218 --- /dev/null +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimitBy.java @@ -0,0 +1,138 @@ +/* + * 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.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.optimizer.LogicalOptimizerContext; +import org.elasticsearch.xpack.esql.plan.logical.CompoundOutputEval; +import org.elasticsearch.xpack.esql.plan.logical.Enrich; +import org.elasticsearch.xpack.esql.plan.logical.Eval; +import org.elasticsearch.xpack.esql.plan.logical.LimitBy; +import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; +import org.elasticsearch.xpack.esql.plan.logical.MvExpand; +import org.elasticsearch.xpack.esql.plan.logical.Project; +import org.elasticsearch.xpack.esql.plan.logical.RegexExtract; +import org.elasticsearch.xpack.esql.plan.logical.UnaryPlan; +import org.elasticsearch.xpack.esql.plan.logical.inference.InferencePlan; +import org.elasticsearch.xpack.esql.plan.logical.join.InlineJoin; +import org.elasticsearch.xpack.esql.plan.logical.join.Join; +import org.elasticsearch.xpack.esql.plan.logical.join.JoinTypes; + +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; + +/** + * Push-down and combine rules specific to {@link LimitBy} (LIMIT N BY groupings). + */ +public final class PushDownAndCombineLimitBy extends OptimizerRules.ParameterizedOptimizerRule { + + public PushDownAndCombineLimitBy() { + super(OptimizerRules.TransformDirection.DOWN); + } + + @Override + public LogicalPlan rule(LimitBy limitBy, LogicalOptimizerContext ctx) { + if (limitBy.child() instanceof LimitBy childLimitBy && listSemanticEquals(childLimitBy.groupings(), limitBy.groupings())) { + return combineLimitBys(limitBy, childLimitBy, ctx.foldCtx()); + } else if (limitBy.child() instanceof UnaryPlan unary) { + if (unary instanceof Eval + || unary instanceof Project + || unary instanceof RegexExtract + || unary instanceof CompoundOutputEval + || unary instanceof InferencePlan) { + if (groupingsReferenceAttributeDefinedByChild(limitBy, unary)) { + return limitBy; + } else { + return unary.replaceChild(limitBy.replaceChild(unary.child())); + } + } else if (unary instanceof MvExpand) { + return duplicateLimitByAsFirstGrandchild(limitBy); + } else if (unary instanceof Enrich enrich) { + if (groupingsReferenceAttributeDefinedByChild(limitBy, enrich)) { + return limitBy; + } + if (enrich.mode() == Enrich.Mode.REMOTE) { + return duplicateLimitByAsFirstGrandchild(limitBy); + } else { + return enrich.replaceChild(limitBy.replaceChild(enrich.child())); + } + } + } else if (limitBy.child() instanceof Join join && join.config().type() == JoinTypes.LEFT && join instanceof InlineJoin == false) { + if (groupingsReferenceAttributeNotInOutput(limitBy, join.left())) { + return limitBy; + } + return duplicateLimitByAsFirstGrandchild(limitBy); + } + return limitBy; + } + + private static LimitBy combineLimitBys(LimitBy upper, LimitBy lower, FoldContext ctx) { + var upperLimitValue = (int) upper.limitPerGroup().fold(ctx); + var lowerLimitValue = (int) lower.limitPerGroup().fold(ctx); + if (lowerLimitValue <= upperLimitValue) { + return lower; + } else { + return new LimitBy(upper.source(), upper.limitPerGroup(), lower.child(), upper.groupings(), upper.duplicated()); + } + } + + /** + * Returns {@code true} if any attribute referenced by the LimitBy'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(LimitBy limitBy, UnaryPlan child) { + return groupingsReferenceAttributeNotInOutput(limitBy, child.child()); + } + + /** + * Returns {@code true} if any attribute referenced by the LimitBy's groupings is absent from the given plan's output. + * Duplicating the LimitBy below such a plan would leave the grouping attribute unresolved. + */ + private static boolean groupingsReferenceAttributeNotInOutput(LimitBy limitBy, LogicalPlan plan) { + Set outputIds = new HashSet<>(); + for (Attribute a : plan.output()) { + outputIds.add(a.id()); + } + for (Expression g : limitBy.groupings()) { + if (g instanceof Attribute a && outputIds.contains(a.id()) == false) { + return true; + } + } + return false; + } + + /** + * Duplicate the LimitBy past its child if it wasn't duplicated yet. + */ + private static LimitBy duplicateLimitByAsFirstGrandchild(LimitBy limitBy) { + if (limitBy.duplicated()) { + return limitBy; + } + + List grandChildren = limitBy.child().children(); + LogicalPlan firstGrandChild = grandChildren.getFirst(); + LogicalPlan newFirstGrandChild = limitBy.replaceChild(firstGrandChild); + + List newGrandChildren = new ArrayList<>(); + newGrandChildren.add(newFirstGrandChild); + for (int i = 1; i < grandChildren.size(); i++) { + newGrandChildren.add(grandChildren.get(i)); + } + + LogicalPlan newChild = limitBy.child().replaceChildren(newGrandChildren); + return limitBy.replaceChild(newChild).withDuplicated(true); + } +} 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..ed6a96e5abdc4 --- /dev/null +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/ReplaceLimitByExpressionWithEval.java @@ -0,0 +1,64 @@ +/* + * 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.LimitBy; +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 LimitBy} 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 { + private static int counter = 0; + + @Override + protected LogicalPlan rule(LimitBy limitBy) { + int size = limitBy.groupings().size(); + List newGroupings = new ArrayList<>(limitBy.groupings()); + List evals = new ArrayList<>(size); + + for (int i = 0; i < size; i++) { + Expression g = newGroupings.get(i); + if (g.foldable()) { + continue; + } + 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 limitBy; + } + + var originalOutput = limitBy.output(); + var evalChild = new Eval(limitBy.source(), limitBy.child(), evals); + var newLimitBy = new LimitBy(limitBy.source(), limitBy.limitPerGroup(), evalChild, newGroupings, limitBy.duplicated()); + return new Project(limitBy.source(), newLimitBy, originalOutput); + } +} diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/SkipQueryOnLimitZero.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/SkipQueryOnLimitZero.java index c6d62dee0ba42..277f5afef2de3 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/SkipQueryOnLimitZero.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/SkipQueryOnLimitZero.java @@ -9,20 +9,26 @@ import org.elasticsearch.xpack.esql.optimizer.LogicalOptimizerContext; import org.elasticsearch.xpack.esql.plan.logical.Limit; +import org.elasticsearch.xpack.esql.plan.logical.LimitBy; import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; +import org.elasticsearch.xpack.esql.plan.logical.UnaryPlan; -public final class SkipQueryOnLimitZero extends OptimizerRules.ParameterizedOptimizerRule { +public final class SkipQueryOnLimitZero extends OptimizerRules.ParameterizedOptimizerRule { public SkipQueryOnLimitZero() { super(OptimizerRules.TransformDirection.DOWN); } @Override - protected LogicalPlan rule(Limit limit, LogicalOptimizerContext ctx) { - if (limit.limit().foldable()) { - if (Integer.valueOf(0).equals((limit.limit().fold(ctx.foldCtx())))) { + protected LogicalPlan rule(UnaryPlan plan, LogicalOptimizerContext ctx) { + if (plan instanceof Limit limit) { + if (limit.limit().foldable() && Integer.valueOf(0).equals(limit.limit().fold(ctx.foldCtx()))) { return PruneEmptyPlans.skipPlan(limit); } + } else if (plan instanceof LimitBy limitBy) { + if (limitBy.limitPerGroup().foldable() && Integer.valueOf(0).equals(limitBy.limitPerGroup().fold(ctx.foldCtx()))) { + return PruneEmptyPlans.skipPlan(limitBy); + } } - return limit; + return plan; } } 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 521716b5cd644..35de7194d473e 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 @@ -457,4 +457,4 @@ promqlIndexString atn: -[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 +[4, 1, 168, 1126, 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, 38, 5, 38, 492, 8, 38, 10, 38, 12, 38, 495, 9, 38, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 501, 8, 39, 10, 39, 12, 39, 504, 9, 39, 1, 40, 1, 40, 3, 40, 508, 8, 40, 1, 40, 1, 40, 3, 40, 512, 8, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 524, 8, 43, 10, 43, 12, 43, 527, 9, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 537, 8, 44, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 543, 8, 45, 1, 46, 1, 46, 1, 46, 5, 46, 548, 8, 46, 10, 46, 12, 46, 551, 9, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 3, 48, 559, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 5, 49, 566, 8, 49, 10, 49, 12, 49, 569, 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, 588, 8, 54, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 594, 8, 54, 10, 54, 12, 54, 597, 9, 54, 3, 54, 599, 8, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 3, 56, 606, 8, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 617, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 624, 8, 58, 1, 59, 1, 59, 1, 59, 1, 60, 4, 60, 630, 8, 60, 11, 60, 12, 60, 631, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 5, 62, 644, 8, 62, 10, 62, 12, 62, 647, 9, 62, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 3, 64, 655, 8, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 666, 8, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 676, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 682, 8, 66, 3, 66, 684, 8, 66, 1, 67, 1, 67, 3, 67, 688, 8, 67, 1, 67, 5, 67, 691, 8, 67, 10, 67, 12, 67, 694, 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, 707, 8, 68, 1, 69, 1, 69, 1, 69, 5, 69, 712, 8, 69, 10, 69, 12, 69, 715, 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, 747, 8, 77, 1, 78, 1, 78, 3, 78, 751, 8, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 3, 79, 761, 8, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 3, 80, 770, 8, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 5, 80, 777, 8, 80, 10, 80, 12, 80, 780, 9, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 3, 80, 787, 8, 80, 1, 80, 1, 80, 1, 80, 3, 80, 792, 8, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 5, 80, 800, 8, 80, 10, 80, 12, 80, 803, 9, 80, 1, 81, 1, 81, 3, 81, 807, 8, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 3, 81, 814, 8, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 3, 81, 821, 8, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 5, 81, 828, 8, 81, 10, 81, 12, 81, 831, 9, 81, 1, 81, 1, 81, 1, 81, 1, 81, 3, 81, 837, 8, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 5, 81, 844, 8, 81, 10, 81, 12, 81, 847, 9, 81, 1, 81, 1, 81, 3, 81, 851, 8, 81, 1, 82, 1, 82, 1, 82, 3, 82, 856, 8, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 3, 83, 866, 8, 83, 1, 84, 1, 84, 1, 84, 1, 84, 3, 84, 872, 8, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 5, 84, 880, 8, 84, 10, 84, 12, 84, 883, 9, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 3, 85, 893, 8, 85, 1, 85, 1, 85, 1, 85, 5, 85, 898, 8, 85, 10, 85, 12, 85, 901, 9, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 5, 86, 909, 8, 86, 10, 86, 12, 86, 912, 9, 86, 1, 86, 1, 86, 3, 86, 916, 8, 86, 3, 86, 918, 8, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 3, 87, 925, 8, 87, 1, 88, 1, 88, 1, 88, 1, 88, 5, 88, 931, 8, 88, 10, 88, 12, 88, 934, 9, 88, 3, 88, 936, 8, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 3, 90, 946, 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, 961, 8, 91, 10, 91, 12, 91, 964, 9, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 5, 91, 972, 8, 91, 10, 91, 12, 91, 975, 9, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 5, 91, 983, 8, 91, 10, 91, 12, 91, 986, 9, 91, 1, 91, 1, 91, 3, 91, 990, 8, 91, 1, 92, 1, 92, 1, 93, 1, 93, 3, 93, 996, 8, 93, 1, 94, 3, 94, 999, 8, 94, 1, 94, 1, 94, 1, 95, 3, 95, 1004, 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, 1020, 8, 99, 1, 99, 1, 99, 1, 99, 3, 99, 1025, 8, 99, 1, 100, 1, 100, 1, 100, 1, 100, 5, 100, 1031, 8, 100, 10, 100, 12, 100, 1034, 9, 100, 1, 101, 1, 101, 5, 101, 1038, 8, 101, 10, 101, 12, 101, 1041, 9, 101, 1, 101, 1, 101, 1, 101, 3, 101, 1046, 8, 101, 1, 101, 1, 101, 4, 101, 1050, 8, 101, 11, 101, 12, 101, 1051, 1, 101, 1, 101, 1, 101, 1, 101, 5, 101, 1058, 8, 101, 10, 101, 12, 101, 1061, 9, 101, 1, 101, 4, 101, 1064, 8, 101, 11, 101, 12, 101, 1065, 3, 101, 1068, 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, 1081, 8, 105, 10, 105, 12, 105, 1084, 9, 105, 1, 105, 1, 105, 3, 105, 1088, 8, 105, 1, 106, 1, 106, 1, 107, 4, 107, 1093, 8, 107, 11, 107, 12, 107, 1094, 1, 107, 1, 107, 5, 107, 1099, 8, 107, 10, 107, 12, 107, 1102, 9, 107, 1, 107, 3, 107, 1105, 8, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 3, 108, 1116, 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, 1176, 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, 496, 1, 0, 0, 0, 80, 505, 1, 0, 0, 0, 82, 513, 1, 0, 0, 0, 84, 516, 1, 0, 0, 0, 86, 519, 1, 0, 0, 0, 88, 536, 1, 0, 0, 0, 90, 538, 1, 0, 0, 0, 92, 544, 1, 0, 0, 0, 94, 552, 1, 0, 0, 0, 96, 558, 1, 0, 0, 0, 98, 560, 1, 0, 0, 0, 100, 570, 1, 0, 0, 0, 102, 573, 1, 0, 0, 0, 104, 576, 1, 0, 0, 0, 106, 580, 1, 0, 0, 0, 108, 583, 1, 0, 0, 0, 110, 600, 1, 0, 0, 0, 112, 605, 1, 0, 0, 0, 114, 609, 1, 0, 0, 0, 116, 612, 1, 0, 0, 0, 118, 625, 1, 0, 0, 0, 120, 629, 1, 0, 0, 0, 122, 633, 1, 0, 0, 0, 124, 637, 1, 0, 0, 0, 126, 648, 1, 0, 0, 0, 128, 650, 1, 0, 0, 0, 130, 661, 1, 0, 0, 0, 132, 683, 1, 0, 0, 0, 134, 685, 1, 0, 0, 0, 136, 706, 1, 0, 0, 0, 138, 708, 1, 0, 0, 0, 140, 716, 1, 0, 0, 0, 142, 718, 1, 0, 0, 0, 144, 720, 1, 0, 0, 0, 146, 725, 1, 0, 0, 0, 148, 728, 1, 0, 0, 0, 150, 733, 1, 0, 0, 0, 152, 738, 1, 0, 0, 0, 154, 742, 1, 0, 0, 0, 156, 748, 1, 0, 0, 0, 158, 760, 1, 0, 0, 0, 160, 791, 1, 0, 0, 0, 162, 850, 1, 0, 0, 0, 164, 852, 1, 0, 0, 0, 166, 865, 1, 0, 0, 0, 168, 871, 1, 0, 0, 0, 170, 892, 1, 0, 0, 0, 172, 902, 1, 0, 0, 0, 174, 924, 1, 0, 0, 0, 176, 926, 1, 0, 0, 0, 178, 939, 1, 0, 0, 0, 180, 945, 1, 0, 0, 0, 182, 989, 1, 0, 0, 0, 184, 991, 1, 0, 0, 0, 186, 995, 1, 0, 0, 0, 188, 998, 1, 0, 0, 0, 190, 1003, 1, 0, 0, 0, 192, 1007, 1, 0, 0, 0, 194, 1009, 1, 0, 0, 0, 196, 1011, 1, 0, 0, 0, 198, 1024, 1, 0, 0, 0, 200, 1026, 1, 0, 0, 0, 202, 1067, 1, 0, 0, 0, 204, 1069, 1, 0, 0, 0, 206, 1071, 1, 0, 0, 0, 208, 1075, 1, 0, 0, 0, 210, 1087, 1, 0, 0, 0, 212, 1089, 1, 0, 0, 0, 214, 1104, 1, 0, 0, 0, 216, 1115, 1, 0, 0, 0, 218, 1117, 1, 0, 0, 0, 220, 1119, 1, 0, 0, 0, 222, 1121, 1, 0, 0, 0, 224, 1123, 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, 493, 3, 160, 80, 0, 489, 490, 5, 68, 0, 0, 490, 492, 3, 160, 80, 0, 491, 489, 1, 0, 0, 0, 492, 495, 1, 0, 0, 0, 493, 491, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 77, 1, 0, 0, 0, 495, 493, 1, 0, 0, 0, 496, 497, 5, 15, 0, 0, 497, 502, 3, 80, 40, 0, 498, 499, 5, 68, 0, 0, 499, 501, 3, 80, 40, 0, 500, 498, 1, 0, 0, 0, 501, 504, 1, 0, 0, 0, 502, 500, 1, 0, 0, 0, 502, 503, 1, 0, 0, 0, 503, 79, 1, 0, 0, 0, 504, 502, 1, 0, 0, 0, 505, 507, 3, 160, 80, 0, 506, 508, 7, 2, 0, 0, 507, 506, 1, 0, 0, 0, 507, 508, 1, 0, 0, 0, 508, 511, 1, 0, 0, 0, 509, 510, 5, 79, 0, 0, 510, 512, 7, 3, 0, 0, 511, 509, 1, 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 81, 1, 0, 0, 0, 513, 514, 5, 37, 0, 0, 514, 515, 3, 60, 30, 0, 515, 83, 1, 0, 0, 0, 516, 517, 5, 36, 0, 0, 517, 518, 3, 60, 30, 0, 518, 85, 1, 0, 0, 0, 519, 520, 5, 40, 0, 0, 520, 525, 3, 88, 44, 0, 521, 522, 5, 68, 0, 0, 522, 524, 3, 88, 44, 0, 523, 521, 1, 0, 0, 0, 524, 527, 1, 0, 0, 0, 525, 523, 1, 0, 0, 0, 525, 526, 1, 0, 0, 0, 526, 87, 1, 0, 0, 0, 527, 525, 1, 0, 0, 0, 528, 529, 3, 56, 28, 0, 529, 530, 5, 158, 0, 0, 530, 531, 3, 56, 28, 0, 531, 537, 1, 0, 0, 0, 532, 533, 3, 56, 28, 0, 533, 534, 5, 63, 0, 0, 534, 535, 3, 56, 28, 0, 535, 537, 1, 0, 0, 0, 536, 528, 1, 0, 0, 0, 536, 532, 1, 0, 0, 0, 537, 89, 1, 0, 0, 0, 538, 539, 5, 8, 0, 0, 539, 540, 3, 170, 85, 0, 540, 542, 3, 192, 96, 0, 541, 543, 3, 92, 46, 0, 542, 541, 1, 0, 0, 0, 542, 543, 1, 0, 0, 0, 543, 91, 1, 0, 0, 0, 544, 549, 3, 94, 47, 0, 545, 546, 5, 68, 0, 0, 546, 548, 3, 94, 47, 0, 547, 545, 1, 0, 0, 0, 548, 551, 1, 0, 0, 0, 549, 547, 1, 0, 0, 0, 549, 550, 1, 0, 0, 0, 550, 93, 1, 0, 0, 0, 551, 549, 1, 0, 0, 0, 552, 553, 3, 62, 31, 0, 553, 554, 5, 63, 0, 0, 554, 555, 3, 182, 91, 0, 555, 95, 1, 0, 0, 0, 556, 557, 5, 85, 0, 0, 557, 559, 3, 176, 88, 0, 558, 556, 1, 0, 0, 0, 558, 559, 1, 0, 0, 0, 559, 97, 1, 0, 0, 0, 560, 561, 5, 10, 0, 0, 561, 562, 3, 170, 85, 0, 562, 567, 3, 192, 96, 0, 563, 564, 5, 68, 0, 0, 564, 566, 3, 192, 96, 0, 565, 563, 1, 0, 0, 0, 566, 569, 1, 0, 0, 0, 567, 565, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, 568, 99, 1, 0, 0, 0, 569, 567, 1, 0, 0, 0, 570, 571, 5, 35, 0, 0, 571, 572, 3, 52, 26, 0, 572, 101, 1, 0, 0, 0, 573, 574, 5, 6, 0, 0, 574, 575, 3, 104, 52, 0, 575, 103, 1, 0, 0, 0, 576, 577, 5, 105, 0, 0, 577, 578, 3, 4, 2, 0, 578, 579, 5, 106, 0, 0, 579, 105, 1, 0, 0, 0, 580, 581, 5, 42, 0, 0, 581, 582, 5, 165, 0, 0, 582, 107, 1, 0, 0, 0, 583, 584, 5, 5, 0, 0, 584, 587, 3, 110, 55, 0, 585, 586, 5, 80, 0, 0, 586, 588, 3, 56, 28, 0, 587, 585, 1, 0, 0, 0, 587, 588, 1, 0, 0, 0, 588, 598, 1, 0, 0, 0, 589, 590, 5, 85, 0, 0, 590, 595, 3, 112, 56, 0, 591, 592, 5, 68, 0, 0, 592, 594, 3, 112, 56, 0, 593, 591, 1, 0, 0, 0, 594, 597, 1, 0, 0, 0, 595, 593, 1, 0, 0, 0, 595, 596, 1, 0, 0, 0, 596, 599, 1, 0, 0, 0, 597, 595, 1, 0, 0, 0, 598, 589, 1, 0, 0, 0, 598, 599, 1, 0, 0, 0, 599, 109, 1, 0, 0, 0, 600, 601, 7, 4, 0, 0, 601, 111, 1, 0, 0, 0, 602, 603, 3, 56, 28, 0, 603, 604, 5, 63, 0, 0, 604, 606, 1, 0, 0, 0, 605, 602, 1, 0, 0, 0, 605, 606, 1, 0, 0, 0, 606, 607, 1, 0, 0, 0, 607, 608, 3, 56, 28, 0, 608, 113, 1, 0, 0, 0, 609, 610, 5, 14, 0, 0, 610, 611, 3, 182, 91, 0, 611, 115, 1, 0, 0, 0, 612, 613, 5, 4, 0, 0, 613, 616, 3, 52, 26, 0, 614, 615, 5, 80, 0, 0, 615, 617, 3, 52, 26, 0, 616, 614, 1, 0, 0, 0, 616, 617, 1, 0, 0, 0, 617, 623, 1, 0, 0, 0, 618, 619, 5, 158, 0, 0, 619, 620, 3, 52, 26, 0, 620, 621, 5, 68, 0, 0, 621, 622, 3, 52, 26, 0, 622, 624, 1, 0, 0, 0, 623, 618, 1, 0, 0, 0, 623, 624, 1, 0, 0, 0, 624, 117, 1, 0, 0, 0, 625, 626, 5, 25, 0, 0, 626, 627, 3, 120, 60, 0, 627, 119, 1, 0, 0, 0, 628, 630, 3, 122, 61, 0, 629, 628, 1, 0, 0, 0, 630, 631, 1, 0, 0, 0, 631, 629, 1, 0, 0, 0, 631, 632, 1, 0, 0, 0, 632, 121, 1, 0, 0, 0, 633, 634, 5, 105, 0, 0, 634, 635, 3, 124, 62, 0, 635, 636, 5, 106, 0, 0, 636, 123, 1, 0, 0, 0, 637, 638, 6, 62, -1, 0, 638, 639, 3, 126, 63, 0, 639, 645, 1, 0, 0, 0, 640, 641, 10, 1, 0, 0, 641, 642, 5, 57, 0, 0, 642, 644, 3, 126, 63, 0, 643, 640, 1, 0, 0, 0, 644, 647, 1, 0, 0, 0, 645, 643, 1, 0, 0, 0, 645, 646, 1, 0, 0, 0, 646, 125, 1, 0, 0, 0, 647, 645, 1, 0, 0, 0, 648, 649, 3, 8, 4, 0, 649, 127, 1, 0, 0, 0, 650, 654, 5, 12, 0, 0, 651, 652, 3, 52, 26, 0, 652, 653, 5, 63, 0, 0, 653, 655, 1, 0, 0, 0, 654, 651, 1, 0, 0, 0, 654, 655, 1, 0, 0, 0, 655, 656, 1, 0, 0, 0, 656, 657, 3, 182, 91, 0, 657, 658, 5, 80, 0, 0, 658, 659, 3, 16, 8, 0, 659, 660, 3, 96, 48, 0, 660, 129, 1, 0, 0, 0, 661, 665, 5, 7, 0, 0, 662, 663, 3, 52, 26, 0, 663, 664, 5, 63, 0, 0, 664, 666, 1, 0, 0, 0, 665, 662, 1, 0, 0, 0, 665, 666, 1, 0, 0, 0, 666, 667, 1, 0, 0, 0, 667, 668, 3, 170, 85, 0, 668, 669, 3, 96, 48, 0, 669, 131, 1, 0, 0, 0, 670, 671, 5, 27, 0, 0, 671, 672, 5, 126, 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, 684, 1, 0, 0, 0, 677, 678, 5, 28, 0, 0, 678, 681, 3, 48, 24, 0, 679, 680, 5, 64, 0, 0, 680, 682, 3, 16, 8, 0, 681, 679, 1, 0, 0, 0, 681, 682, 1, 0, 0, 0, 682, 684, 1, 0, 0, 0, 683, 670, 1, 0, 0, 0, 683, 677, 1, 0, 0, 0, 684, 133, 1, 0, 0, 0, 685, 687, 5, 26, 0, 0, 686, 688, 3, 62, 31, 0, 687, 686, 1, 0, 0, 0, 687, 688, 1, 0, 0, 0, 688, 692, 1, 0, 0, 0, 689, 691, 3, 136, 68, 0, 690, 689, 1, 0, 0, 0, 691, 694, 1, 0, 0, 0, 692, 690, 1, 0, 0, 0, 692, 693, 1, 0, 0, 0, 693, 135, 1, 0, 0, 0, 694, 692, 1, 0, 0, 0, 695, 696, 5, 121, 0, 0, 696, 697, 5, 64, 0, 0, 697, 707, 3, 52, 26, 0, 698, 699, 5, 122, 0, 0, 699, 700, 5, 64, 0, 0, 700, 707, 3, 138, 69, 0, 701, 702, 5, 120, 0, 0, 702, 703, 5, 64, 0, 0, 703, 707, 3, 52, 26, 0, 704, 705, 5, 85, 0, 0, 705, 707, 3, 176, 88, 0, 706, 695, 1, 0, 0, 0, 706, 698, 1, 0, 0, 0, 706, 701, 1, 0, 0, 0, 706, 704, 1, 0, 0, 0, 707, 137, 1, 0, 0, 0, 708, 713, 3, 52, 26, 0, 709, 710, 5, 68, 0, 0, 710, 712, 3, 52, 26, 0, 711, 709, 1, 0, 0, 0, 712, 715, 1, 0, 0, 0, 713, 711, 1, 0, 0, 0, 713, 714, 1, 0, 0, 0, 714, 139, 1, 0, 0, 0, 715, 713, 1, 0, 0, 0, 716, 717, 5, 19, 0, 0, 717, 141, 1, 0, 0, 0, 718, 719, 5, 21, 0, 0, 719, 143, 1, 0, 0, 0, 720, 721, 5, 33, 0, 0, 721, 722, 3, 32, 16, 0, 722, 723, 5, 80, 0, 0, 723, 724, 3, 60, 30, 0, 724, 145, 1, 0, 0, 0, 725, 726, 5, 38, 0, 0, 726, 727, 3, 60, 30, 0, 727, 147, 1, 0, 0, 0, 728, 729, 5, 18, 0, 0, 729, 730, 3, 52, 26, 0, 730, 731, 5, 63, 0, 0, 731, 732, 3, 170, 85, 0, 732, 149, 1, 0, 0, 0, 733, 734, 5, 20, 0, 0, 734, 735, 3, 52, 26, 0, 735, 736, 5, 63, 0, 0, 736, 737, 3, 170, 85, 0, 737, 151, 1, 0, 0, 0, 738, 739, 5, 41, 0, 0, 739, 740, 3, 154, 77, 0, 740, 741, 5, 67, 0, 0, 741, 153, 1, 0, 0, 0, 742, 743, 3, 62, 31, 0, 743, 746, 5, 63, 0, 0, 744, 747, 3, 182, 91, 0, 745, 747, 3, 176, 88, 0, 746, 744, 1, 0, 0, 0, 746, 745, 1, 0, 0, 0, 747, 155, 1, 0, 0, 0, 748, 750, 5, 34, 0, 0, 749, 751, 3, 158, 79, 0, 750, 749, 1, 0, 0, 0, 750, 751, 1, 0, 0, 0, 751, 752, 1, 0, 0, 0, 752, 753, 5, 80, 0, 0, 753, 754, 3, 52, 26, 0, 754, 755, 5, 141, 0, 0, 755, 756, 3, 190, 95, 0, 756, 757, 3, 96, 48, 0, 757, 157, 1, 0, 0, 0, 758, 761, 3, 66, 33, 0, 759, 761, 3, 170, 85, 0, 760, 758, 1, 0, 0, 0, 760, 759, 1, 0, 0, 0, 761, 159, 1, 0, 0, 0, 762, 763, 6, 80, -1, 0, 763, 764, 5, 77, 0, 0, 764, 792, 3, 160, 80, 8, 765, 792, 3, 166, 83, 0, 766, 792, 3, 162, 81, 0, 767, 769, 3, 166, 83, 0, 768, 770, 5, 77, 0, 0, 769, 768, 1, 0, 0, 0, 769, 770, 1, 0, 0, 0, 770, 771, 1, 0, 0, 0, 771, 772, 5, 73, 0, 0, 772, 773, 5, 105, 0, 0, 773, 778, 3, 166, 83, 0, 774, 775, 5, 68, 0, 0, 775, 777, 3, 166, 83, 0, 776, 774, 1, 0, 0, 0, 777, 780, 1, 0, 0, 0, 778, 776, 1, 0, 0, 0, 778, 779, 1, 0, 0, 0, 779, 781, 1, 0, 0, 0, 780, 778, 1, 0, 0, 0, 781, 782, 5, 106, 0, 0, 782, 792, 1, 0, 0, 0, 783, 784, 3, 166, 83, 0, 784, 786, 5, 74, 0, 0, 785, 787, 5, 77, 0, 0, 786, 785, 1, 0, 0, 0, 786, 787, 1, 0, 0, 0, 787, 788, 1, 0, 0, 0, 788, 789, 5, 78, 0, 0, 789, 792, 1, 0, 0, 0, 790, 792, 3, 164, 82, 0, 791, 762, 1, 0, 0, 0, 791, 765, 1, 0, 0, 0, 791, 766, 1, 0, 0, 0, 791, 767, 1, 0, 0, 0, 791, 783, 1, 0, 0, 0, 791, 790, 1, 0, 0, 0, 792, 801, 1, 0, 0, 0, 793, 794, 10, 5, 0, 0, 794, 795, 5, 61, 0, 0, 795, 800, 3, 160, 80, 6, 796, 797, 10, 4, 0, 0, 797, 798, 5, 81, 0, 0, 798, 800, 3, 160, 80, 5, 799, 793, 1, 0, 0, 0, 799, 796, 1, 0, 0, 0, 800, 803, 1, 0, 0, 0, 801, 799, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 802, 161, 1, 0, 0, 0, 803, 801, 1, 0, 0, 0, 804, 806, 3, 166, 83, 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, 3, 72, 36, 0, 810, 851, 1, 0, 0, 0, 811, 813, 3, 166, 83, 0, 812, 814, 5, 77, 0, 0, 813, 812, 1, 0, 0, 0, 813, 814, 1, 0, 0, 0, 814, 815, 1, 0, 0, 0, 815, 816, 5, 83, 0, 0, 816, 817, 3, 72, 36, 0, 817, 851, 1, 0, 0, 0, 818, 820, 3, 166, 83, 0, 819, 821, 5, 77, 0, 0, 820, 819, 1, 0, 0, 0, 820, 821, 1, 0, 0, 0, 821, 822, 1, 0, 0, 0, 822, 823, 5, 76, 0, 0, 823, 824, 5, 105, 0, 0, 824, 829, 3, 72, 36, 0, 825, 826, 5, 68, 0, 0, 826, 828, 3, 72, 36, 0, 827, 825, 1, 0, 0, 0, 828, 831, 1, 0, 0, 0, 829, 827, 1, 0, 0, 0, 829, 830, 1, 0, 0, 0, 830, 832, 1, 0, 0, 0, 831, 829, 1, 0, 0, 0, 832, 833, 5, 106, 0, 0, 833, 851, 1, 0, 0, 0, 834, 836, 3, 166, 83, 0, 835, 837, 5, 77, 0, 0, 836, 835, 1, 0, 0, 0, 836, 837, 1, 0, 0, 0, 837, 838, 1, 0, 0, 0, 838, 839, 5, 83, 0, 0, 839, 840, 5, 105, 0, 0, 840, 845, 3, 72, 36, 0, 841, 842, 5, 68, 0, 0, 842, 844, 3, 72, 36, 0, 843, 841, 1, 0, 0, 0, 844, 847, 1, 0, 0, 0, 845, 843, 1, 0, 0, 0, 845, 846, 1, 0, 0, 0, 846, 848, 1, 0, 0, 0, 847, 845, 1, 0, 0, 0, 848, 849, 5, 106, 0, 0, 849, 851, 1, 0, 0, 0, 850, 804, 1, 0, 0, 0, 850, 811, 1, 0, 0, 0, 850, 818, 1, 0, 0, 0, 850, 834, 1, 0, 0, 0, 851, 163, 1, 0, 0, 0, 852, 855, 3, 52, 26, 0, 853, 854, 5, 65, 0, 0, 854, 856, 3, 12, 6, 0, 855, 853, 1, 0, 0, 0, 855, 856, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 858, 5, 66, 0, 0, 858, 859, 3, 182, 91, 0, 859, 165, 1, 0, 0, 0, 860, 866, 3, 168, 84, 0, 861, 862, 3, 168, 84, 0, 862, 863, 3, 194, 97, 0, 863, 864, 3, 168, 84, 0, 864, 866, 1, 0, 0, 0, 865, 860, 1, 0, 0, 0, 865, 861, 1, 0, 0, 0, 866, 167, 1, 0, 0, 0, 867, 868, 6, 84, -1, 0, 868, 872, 3, 170, 85, 0, 869, 870, 7, 5, 0, 0, 870, 872, 3, 168, 84, 3, 871, 867, 1, 0, 0, 0, 871, 869, 1, 0, 0, 0, 872, 881, 1, 0, 0, 0, 873, 874, 10, 2, 0, 0, 874, 875, 7, 6, 0, 0, 875, 880, 3, 168, 84, 3, 876, 877, 10, 1, 0, 0, 877, 878, 7, 5, 0, 0, 878, 880, 3, 168, 84, 2, 879, 873, 1, 0, 0, 0, 879, 876, 1, 0, 0, 0, 880, 883, 1, 0, 0, 0, 881, 879, 1, 0, 0, 0, 881, 882, 1, 0, 0, 0, 882, 169, 1, 0, 0, 0, 883, 881, 1, 0, 0, 0, 884, 885, 6, 85, -1, 0, 885, 893, 3, 182, 91, 0, 886, 893, 3, 52, 26, 0, 887, 893, 3, 172, 86, 0, 888, 889, 5, 105, 0, 0, 889, 890, 3, 160, 80, 0, 890, 891, 5, 106, 0, 0, 891, 893, 1, 0, 0, 0, 892, 884, 1, 0, 0, 0, 892, 886, 1, 0, 0, 0, 892, 887, 1, 0, 0, 0, 892, 888, 1, 0, 0, 0, 893, 899, 1, 0, 0, 0, 894, 895, 10, 1, 0, 0, 895, 896, 5, 65, 0, 0, 896, 898, 3, 12, 6, 0, 897, 894, 1, 0, 0, 0, 898, 901, 1, 0, 0, 0, 899, 897, 1, 0, 0, 0, 899, 900, 1, 0, 0, 0, 900, 171, 1, 0, 0, 0, 901, 899, 1, 0, 0, 0, 902, 903, 3, 174, 87, 0, 903, 917, 5, 105, 0, 0, 904, 918, 5, 95, 0, 0, 905, 910, 3, 160, 80, 0, 906, 907, 5, 68, 0, 0, 907, 909, 3, 160, 80, 0, 908, 906, 1, 0, 0, 0, 909, 912, 1, 0, 0, 0, 910, 908, 1, 0, 0, 0, 910, 911, 1, 0, 0, 0, 911, 915, 1, 0, 0, 0, 912, 910, 1, 0, 0, 0, 913, 914, 5, 68, 0, 0, 914, 916, 3, 176, 88, 0, 915, 913, 1, 0, 0, 0, 915, 916, 1, 0, 0, 0, 916, 918, 1, 0, 0, 0, 917, 904, 1, 0, 0, 0, 917, 905, 1, 0, 0, 0, 917, 918, 1, 0, 0, 0, 918, 919, 1, 0, 0, 0, 919, 920, 5, 106, 0, 0, 920, 173, 1, 0, 0, 0, 921, 925, 3, 70, 35, 0, 922, 925, 5, 72, 0, 0, 923, 925, 5, 75, 0, 0, 924, 921, 1, 0, 0, 0, 924, 922, 1, 0, 0, 0, 924, 923, 1, 0, 0, 0, 925, 175, 1, 0, 0, 0, 926, 935, 5, 98, 0, 0, 927, 932, 3, 178, 89, 0, 928, 929, 5, 68, 0, 0, 929, 931, 3, 178, 89, 0, 930, 928, 1, 0, 0, 0, 931, 934, 1, 0, 0, 0, 932, 930, 1, 0, 0, 0, 932, 933, 1, 0, 0, 0, 933, 936, 1, 0, 0, 0, 934, 932, 1, 0, 0, 0, 935, 927, 1, 0, 0, 0, 935, 936, 1, 0, 0, 0, 936, 937, 1, 0, 0, 0, 937, 938, 5, 99, 0, 0, 938, 177, 1, 0, 0, 0, 939, 940, 3, 192, 96, 0, 940, 941, 5, 66, 0, 0, 941, 942, 3, 180, 90, 0, 942, 179, 1, 0, 0, 0, 943, 946, 3, 182, 91, 0, 944, 946, 3, 176, 88, 0, 945, 943, 1, 0, 0, 0, 945, 944, 1, 0, 0, 0, 946, 181, 1, 0, 0, 0, 947, 990, 5, 78, 0, 0, 948, 949, 3, 190, 95, 0, 949, 950, 5, 107, 0, 0, 950, 990, 1, 0, 0, 0, 951, 990, 3, 188, 94, 0, 952, 990, 3, 190, 95, 0, 953, 990, 3, 184, 92, 0, 954, 990, 3, 66, 33, 0, 955, 990, 3, 192, 96, 0, 956, 957, 5, 103, 0, 0, 957, 962, 3, 186, 93, 0, 958, 959, 5, 68, 0, 0, 959, 961, 3, 186, 93, 0, 960, 958, 1, 0, 0, 0, 961, 964, 1, 0, 0, 0, 962, 960, 1, 0, 0, 0, 962, 963, 1, 0, 0, 0, 963, 965, 1, 0, 0, 0, 964, 962, 1, 0, 0, 0, 965, 966, 5, 104, 0, 0, 966, 990, 1, 0, 0, 0, 967, 968, 5, 103, 0, 0, 968, 973, 3, 184, 92, 0, 969, 970, 5, 68, 0, 0, 970, 972, 3, 184, 92, 0, 971, 969, 1, 0, 0, 0, 972, 975, 1, 0, 0, 0, 973, 971, 1, 0, 0, 0, 973, 974, 1, 0, 0, 0, 974, 976, 1, 0, 0, 0, 975, 973, 1, 0, 0, 0, 976, 977, 5, 104, 0, 0, 977, 990, 1, 0, 0, 0, 978, 979, 5, 103, 0, 0, 979, 984, 3, 192, 96, 0, 980, 981, 5, 68, 0, 0, 981, 983, 3, 192, 96, 0, 982, 980, 1, 0, 0, 0, 983, 986, 1, 0, 0, 0, 984, 982, 1, 0, 0, 0, 984, 985, 1, 0, 0, 0, 985, 987, 1, 0, 0, 0, 986, 984, 1, 0, 0, 0, 987, 988, 5, 104, 0, 0, 988, 990, 1, 0, 0, 0, 989, 947, 1, 0, 0, 0, 989, 948, 1, 0, 0, 0, 989, 951, 1, 0, 0, 0, 989, 952, 1, 0, 0, 0, 989, 953, 1, 0, 0, 0, 989, 954, 1, 0, 0, 0, 989, 955, 1, 0, 0, 0, 989, 956, 1, 0, 0, 0, 989, 967, 1, 0, 0, 0, 989, 978, 1, 0, 0, 0, 990, 183, 1, 0, 0, 0, 991, 992, 7, 7, 0, 0, 992, 185, 1, 0, 0, 0, 993, 996, 3, 188, 94, 0, 994, 996, 3, 190, 95, 0, 995, 993, 1, 0, 0, 0, 995, 994, 1, 0, 0, 0, 996, 187, 1, 0, 0, 0, 997, 999, 7, 5, 0, 0, 998, 997, 1, 0, 0, 0, 998, 999, 1, 0, 0, 0, 999, 1000, 1, 0, 0, 0, 1000, 1001, 5, 60, 0, 0, 1001, 189, 1, 0, 0, 0, 1002, 1004, 7, 5, 0, 0, 1003, 1002, 1, 0, 0, 0, 1003, 1004, 1, 0, 0, 0, 1004, 1005, 1, 0, 0, 0, 1005, 1006, 5, 59, 0, 0, 1006, 191, 1, 0, 0, 0, 1007, 1008, 5, 58, 0, 0, 1008, 193, 1, 0, 0, 0, 1009, 1010, 7, 8, 0, 0, 1010, 195, 1, 0, 0, 0, 1011, 1012, 7, 9, 0, 0, 1012, 1013, 5, 130, 0, 0, 1013, 1014, 3, 198, 99, 0, 1014, 1015, 3, 200, 100, 0, 1015, 197, 1, 0, 0, 0, 1016, 1017, 4, 99, 15, 0, 1017, 1019, 3, 32, 16, 0, 1018, 1020, 5, 158, 0, 0, 1019, 1018, 1, 0, 0, 0, 1019, 1020, 1, 0, 0, 0, 1020, 1021, 1, 0, 0, 0, 1021, 1022, 5, 113, 0, 0, 1022, 1025, 1, 0, 0, 0, 1023, 1025, 3, 32, 16, 0, 1024, 1016, 1, 0, 0, 0, 1024, 1023, 1, 0, 0, 0, 1025, 199, 1, 0, 0, 0, 1026, 1027, 5, 80, 0, 0, 1027, 1032, 3, 160, 80, 0, 1028, 1029, 5, 68, 0, 0, 1029, 1031, 3, 160, 80, 0, 1030, 1028, 1, 0, 0, 0, 1031, 1034, 1, 0, 0, 0, 1032, 1030, 1, 0, 0, 0, 1032, 1033, 1, 0, 0, 0, 1033, 201, 1, 0, 0, 0, 1034, 1032, 1, 0, 0, 0, 1035, 1039, 5, 39, 0, 0, 1036, 1038, 3, 206, 103, 0, 1037, 1036, 1, 0, 0, 0, 1038, 1041, 1, 0, 0, 0, 1039, 1037, 1, 0, 0, 0, 1039, 1040, 1, 0, 0, 0, 1040, 1045, 1, 0, 0, 0, 1041, 1039, 1, 0, 0, 0, 1042, 1043, 3, 204, 102, 0, 1043, 1044, 5, 63, 0, 0, 1044, 1046, 1, 0, 0, 0, 1045, 1042, 1, 0, 0, 0, 1045, 1046, 1, 0, 0, 0, 1046, 1047, 1, 0, 0, 0, 1047, 1049, 5, 105, 0, 0, 1048, 1050, 3, 214, 107, 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, 1053, 1, 0, 0, 0, 1053, 1054, 5, 106, 0, 0, 1054, 1068, 1, 0, 0, 0, 1055, 1059, 5, 39, 0, 0, 1056, 1058, 3, 206, 103, 0, 1057, 1056, 1, 0, 0, 0, 1058, 1061, 1, 0, 0, 0, 1059, 1057, 1, 0, 0, 0, 1059, 1060, 1, 0, 0, 0, 1060, 1063, 1, 0, 0, 0, 1061, 1059, 1, 0, 0, 0, 1062, 1064, 3, 214, 107, 0, 1063, 1062, 1, 0, 0, 0, 1064, 1065, 1, 0, 0, 0, 1065, 1063, 1, 0, 0, 0, 1065, 1066, 1, 0, 0, 0, 1066, 1068, 1, 0, 0, 0, 1067, 1035, 1, 0, 0, 0, 1067, 1055, 1, 0, 0, 0, 1068, 203, 1, 0, 0, 0, 1069, 1070, 7, 1, 0, 0, 1070, 205, 1, 0, 0, 0, 1071, 1072, 3, 208, 104, 0, 1072, 1073, 5, 63, 0, 0, 1073, 1074, 3, 210, 105, 0, 1074, 207, 1, 0, 0, 0, 1075, 1076, 7, 10, 0, 0, 1076, 209, 1, 0, 0, 0, 1077, 1082, 3, 216, 108, 0, 1078, 1079, 5, 68, 0, 0, 1079, 1081, 3, 216, 108, 0, 1080, 1078, 1, 0, 0, 0, 1081, 1084, 1, 0, 0, 0, 1082, 1080, 1, 0, 0, 0, 1082, 1083, 1, 0, 0, 0, 1083, 1088, 1, 0, 0, 0, 1084, 1082, 1, 0, 0, 0, 1085, 1088, 5, 108, 0, 0, 1086, 1088, 5, 101, 0, 0, 1087, 1077, 1, 0, 0, 0, 1087, 1085, 1, 0, 0, 0, 1087, 1086, 1, 0, 0, 0, 1088, 211, 1, 0, 0, 0, 1089, 1090, 7, 11, 0, 0, 1090, 213, 1, 0, 0, 0, 1091, 1093, 3, 212, 106, 0, 1092, 1091, 1, 0, 0, 0, 1093, 1094, 1, 0, 0, 0, 1094, 1092, 1, 0, 0, 0, 1094, 1095, 1, 0, 0, 0, 1095, 1105, 1, 0, 0, 0, 1096, 1100, 5, 105, 0, 0, 1097, 1099, 3, 214, 107, 0, 1098, 1097, 1, 0, 0, 0, 1099, 1102, 1, 0, 0, 0, 1100, 1098, 1, 0, 0, 0, 1100, 1101, 1, 0, 0, 0, 1101, 1103, 1, 0, 0, 0, 1102, 1100, 1, 0, 0, 0, 1103, 1105, 5, 106, 0, 0, 1104, 1092, 1, 0, 0, 0, 1104, 1096, 1, 0, 0, 0, 1105, 215, 1, 0, 0, 0, 1106, 1107, 3, 218, 109, 0, 1107, 1108, 5, 66, 0, 0, 1108, 1109, 3, 222, 111, 0, 1109, 1116, 1, 0, 0, 0, 1110, 1111, 3, 222, 111, 0, 1111, 1112, 5, 65, 0, 0, 1112, 1113, 3, 220, 110, 0, 1113, 1116, 1, 0, 0, 0, 1114, 1116, 3, 224, 112, 0, 1115, 1106, 1, 0, 0, 0, 1115, 1110, 1, 0, 0, 0, 1115, 1114, 1, 0, 0, 0, 1116, 217, 1, 0, 0, 0, 1117, 1118, 7, 12, 0, 0, 1118, 219, 1, 0, 0, 0, 1119, 1120, 7, 12, 0, 0, 1120, 221, 1, 0, 0, 0, 1121, 1122, 7, 12, 0, 0, 1122, 223, 1, 0, 0, 0, 1123, 1124, 7, 13, 0, 0, 1124, 225, 1, 0, 0, 0, 110, 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, 493, 502, 507, 511, 525, 536, 542, 549, 558, 567, 587, 595, 598, 605, 616, 623, 631, 645, 654, 665, 675, 681, 683, 687, 692, 706, 713, 746, 750, 760, 769, 778, 786, 791, 799, 801, 806, 813, 820, 829, 836, 845, 850, 855, 865, 871, 879, 881, 892, 899, 910, 915, 917, 924, 932, 935, 945, 962, 973, 984, 989, 995, 998, 1003, 1019, 1024, 1032, 1039, 1045, 1051, 1059, 1065, 1067, 1082, 1087, 1094, 1100, 1104, 1115] \ 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 ad93d856c336c..ee902ce52f552 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 @@ -3120,10 +3120,16 @@ public final LimitCommandContext limitCommand() throws RecognitionException { @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); + public List booleanExpression() { + return getRuleContexts(BooleanExpressionContext.class); + } + public BooleanExpressionContext booleanExpression(int i) { + return getRuleContext(BooleanExpressionContext.class,i); + } + public List COMMA() { return getTokens(EsqlBaseParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(EsqlBaseParser.COMMA, i); } @SuppressWarnings("this-escape") public LimitByGroupKeyContext(ParserRuleContext parent, int invokingState) { @@ -3149,6 +3155,7 @@ public final LimitByGroupKeyContext limitByGroupKey() throws RecognitionExceptio LimitByGroupKeyContext _localctx = new LimitByGroupKeyContext(_ctx, getState()); enterRule(_localctx, 76, RULE_limitByGroupKey); try { + int _alt; enterOuterAlt(_localctx, 1); { setState(486); @@ -3156,7 +3163,25 @@ public final LimitByGroupKeyContext limitByGroupKey() throws RecognitionExceptio setState(487); match(BY); setState(488); - ((LimitByGroupKeyContext)_localctx).grouping = fields(); + booleanExpression(0); + setState(493); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(489); + match(COMMA); + setState(490); + booleanExpression(0); + } + } + } + setState(495); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + } } } catch (RecognitionException re) { @@ -3210,27 +3235,27 @@ public final SortCommandContext sortCommand() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(490); + setState(496); match(SORT); - setState(491); + setState(497); orderExpression(); - setState(496); + setState(502); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + _alt = getInterpreter().adaptivePredict(_input,32,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(492); + setState(498); match(COMMA); - setState(493); + setState(499); orderExpression(); } } } - setState(498); + setState(504); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + _alt = getInterpreter().adaptivePredict(_input,32,_ctx); } } } @@ -3284,14 +3309,14 @@ public final OrderExpressionContext orderExpression() throws RecognitionExceptio try { enterOuterAlt(_localctx, 1); { - setState(499); + setState(505); booleanExpression(0); - setState(501); + setState(507); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { case 1: { - setState(500); + setState(506); ((OrderExpressionContext)_localctx).ordering = _input.LT(1); _la = _input.LA(1); if ( !(_la==ASC || _la==DESC) ) { @@ -3305,14 +3330,14 @@ public final OrderExpressionContext orderExpression() throws RecognitionExceptio } break; } - setState(505); + setState(511); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) { case 1: { - setState(503); + setState(509); match(NULLS); - setState(504); + setState(510); ((OrderExpressionContext)_localctx).nullOrdering = _input.LT(1); _la = _input.LA(1); if ( !(_la==FIRST || _la==LAST) ) { @@ -3371,9 +3396,9 @@ public final KeepCommandContext keepCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(507); + setState(513); match(KEEP); - setState(508); + setState(514); qualifiedNamePatterns(); } } @@ -3420,9 +3445,9 @@ public final DropCommandContext dropCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(510); + setState(516); match(DROP); - setState(511); + setState(517); qualifiedNamePatterns(); } } @@ -3477,27 +3502,27 @@ public final RenameCommandContext renameCommand() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(513); + setState(519); match(RENAME); - setState(514); + setState(520); renameClause(); - setState(519); + setState(525); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,34,_ctx); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(515); + setState(521); match(COMMA); - setState(516); + setState(522); renameClause(); } } } - setState(521); + setState(527); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,34,_ctx); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); } } } @@ -3548,28 +3573,28 @@ public final RenameClauseContext renameClause() throws RecognitionException { RenameClauseContext _localctx = new RenameClauseContext(_ctx, getState()); enterRule(_localctx, 88, RULE_renameClause); try { - setState(530); + setState(536); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(522); + setState(528); ((RenameClauseContext)_localctx).oldName = qualifiedNamePattern(); - setState(523); + setState(529); match(AS); - setState(524); + setState(530); ((RenameClauseContext)_localctx).newName = qualifiedNamePattern(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(526); + setState(532); ((RenameClauseContext)_localctx).newName = qualifiedNamePattern(); - setState(527); + setState(533); match(ASSIGN); - setState(528); + setState(534); ((RenameClauseContext)_localctx).oldName = qualifiedNamePattern(); } break; @@ -3624,18 +3649,18 @@ public final DissectCommandContext dissectCommand() throws RecognitionException try { enterOuterAlt(_localctx, 1); { - setState(532); + setState(538); match(DISSECT); - setState(533); + setState(539); primaryExpression(0); - setState(534); + setState(540); string(); - setState(536); + setState(542); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { case 1: { - setState(535); + setState(541); dissectCommandOptions(); } break; @@ -3692,25 +3717,25 @@ public final DissectCommandOptionsContext dissectCommandOptions() throws Recogni int _alt; enterOuterAlt(_localctx, 1); { - setState(538); + setState(544); dissectCommandOption(); - setState(543); + setState(549); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + _alt = getInterpreter().adaptivePredict(_input,38,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(539); + setState(545); match(COMMA); - setState(540); + setState(546); dissectCommandOption(); } } } - setState(545); + setState(551); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + _alt = getInterpreter().adaptivePredict(_input,38,_ctx); } } } @@ -3760,11 +3785,11 @@ public final DissectCommandOptionContext dissectCommandOption() throws Recogniti try { enterOuterAlt(_localctx, 1); { - setState(546); + setState(552); identifier(); - setState(547); + setState(553); match(ASSIGN); - setState(548); + setState(554); constant(); } } @@ -3811,14 +3836,14 @@ public final CommandNamedParametersContext commandNamedParameters() throws Recog try { enterOuterAlt(_localctx, 1); { - setState(552); + setState(558); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) { case 1: { - setState(550); + setState(556); match(WITH); - setState(551); + setState(557); mapExpression(); } break; @@ -3879,29 +3904,29 @@ public final GrokCommandContext grokCommand() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(554); + setState(560); match(GROK); - setState(555); + setState(561); primaryExpression(0); - setState(556); + setState(562); string(); - setState(561); + setState(567); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + _alt = getInterpreter().adaptivePredict(_input,40,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(557); + setState(563); match(COMMA); - setState(558); + setState(564); string(); } } } - setState(563); + setState(569); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + _alt = getInterpreter().adaptivePredict(_input,40,_ctx); } } } @@ -3948,9 +3973,9 @@ public final MvExpandCommandContext mvExpandCommand() throws RecognitionExceptio try { enterOuterAlt(_localctx, 1); { - setState(564); + setState(570); match(MV_EXPAND); - setState(565); + setState(571); qualifiedName(); } } @@ -3997,9 +4022,9 @@ public final ExplainCommandContext explainCommand() throws RecognitionException try { enterOuterAlt(_localctx, 1); { - setState(567); + setState(573); match(DEV_EXPLAIN); - setState(568); + setState(574); subqueryExpression(); } } @@ -4047,11 +4072,11 @@ public final SubqueryExpressionContext subqueryExpression() throws RecognitionEx try { enterOuterAlt(_localctx, 1); { - setState(570); + setState(576); match(LP); - setState(571); + setState(577); query(0); - setState(572); + setState(578); match(RP); } } @@ -4108,9 +4133,9 @@ public final ShowCommandContext showCommand() throws RecognitionException { _localctx = new ShowInfoContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(574); + setState(580); match(SHOW); - setState(575); + setState(581); match(INFO); } } @@ -4175,48 +4200,48 @@ public final EnrichCommandContext enrichCommand() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(577); + setState(583); match(ENRICH); - setState(578); + setState(584); ((EnrichCommandContext)_localctx).policyName = enrichPolicyName(); - setState(581); + setState(587); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,41,_ctx) ) { case 1: { - setState(579); + setState(585); match(ON); - setState(580); + setState(586); ((EnrichCommandContext)_localctx).matchField = qualifiedNamePattern(); } break; } - setState(592); + setState(598); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) { case 1: { - setState(583); + setState(589); match(WITH); - setState(584); + setState(590); enrichWithClause(); - setState(589); + setState(595); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,41,_ctx); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(585); + setState(591); match(COMMA); - setState(586); + setState(592); enrichWithClause(); } } } - setState(591); + setState(597); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,41,_ctx); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); } } break; @@ -4265,7 +4290,7 @@ public final EnrichPolicyNameContext enrichPolicyName() throws RecognitionExcept try { enterOuterAlt(_localctx, 1); { - setState(594); + setState(600); _la = _input.LA(1); if ( !(_la==ENRICH_POLICY_NAME || _la==QUOTED_STRING) ) { _errHandler.recoverInline(this); @@ -4325,19 +4350,19 @@ public final EnrichWithClauseContext enrichWithClause() throws RecognitionExcept try { enterOuterAlt(_localctx, 1); { - setState(599); + setState(605); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) { case 1: { - setState(596); + setState(602); ((EnrichWithClauseContext)_localctx).newName = qualifiedNamePattern(); - setState(597); + setState(603); match(ASSIGN); } break; } - setState(601); + setState(607); ((EnrichWithClauseContext)_localctx).enrichField = qualifiedNamePattern(); } } @@ -4385,9 +4410,9 @@ public final SampleCommandContext sampleCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(603); + setState(609); match(SAMPLE); - setState(604); + setState(610); ((SampleCommandContext)_localctx).probability = constant(); } } @@ -4444,34 +4469,34 @@ public final ChangePointCommandContext changePointCommand() throws RecognitionEx try { enterOuterAlt(_localctx, 1); { - setState(606); + setState(612); match(CHANGE_POINT); - setState(607); + setState(613); ((ChangePointCommandContext)_localctx).value = qualifiedName(); - setState(610); + setState(616); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { case 1: { - setState(608); + setState(614); match(ON); - setState(609); + setState(615); ((ChangePointCommandContext)_localctx).key = qualifiedName(); } break; } - setState(617); + setState(623); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,46,_ctx) ) { case 1: { - setState(612); + setState(618); match(AS); - setState(613); + setState(619); ((ChangePointCommandContext)_localctx).targetType = qualifiedName(); - setState(614); + setState(620); match(COMMA); - setState(615); + setState(621); ((ChangePointCommandContext)_localctx).targetPvalue = qualifiedName(); } break; @@ -4521,9 +4546,9 @@ public final ForkCommandContext forkCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(619); + setState(625); match(FORK); - setState(620); + setState(626); forkSubQueries(); } } @@ -4573,7 +4598,7 @@ public final ForkSubQueriesContext forkSubQueries() throws RecognitionException int _alt; enterOuterAlt(_localctx, 1); { - setState(623); + setState(629); _errHandler.sync(this); _alt = 1; do { @@ -4581,7 +4606,7 @@ public final ForkSubQueriesContext forkSubQueries() throws RecognitionException case 1: { { - setState(622); + setState(628); forkSubQuery(); } } @@ -4589,9 +4614,9 @@ public final ForkSubQueriesContext forkSubQueries() throws RecognitionException default: throw new NoViableAltException(this); } - setState(625); + setState(631); _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 ); } } @@ -4639,11 +4664,11 @@ public final ForkSubQueryContext forkSubQuery() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(627); + setState(633); match(LP); - setState(628); + setState(634); forkSubQueryCommand(0); - setState(629); + setState(635); match(RP); } } @@ -4739,13 +4764,13 @@ private ForkSubQueryCommandContext forkSubQueryCommand(int _p) throws Recognitio _ctx = _localctx; _prevctx = _localctx; - setState(632); + setState(638); forkSubQueryProcessingCommand(); } _ctx.stop = _input.LT(-1); - setState(639); + setState(645); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,47,_ctx); + _alt = getInterpreter().adaptivePredict(_input,48,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); @@ -4754,18 +4779,18 @@ private ForkSubQueryCommandContext forkSubQueryCommand(int _p) throws Recognitio { _localctx = new CompositeForkSubQueryContext(new ForkSubQueryCommandContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_forkSubQueryCommand); - setState(634); + setState(640); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(635); + setState(641); match(PIPE); - setState(636); + setState(642); forkSubQueryProcessingCommand(); } } } - setState(641); + setState(647); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,47,_ctx); + _alt = getInterpreter().adaptivePredict(_input,48,_ctx); } } } @@ -4811,7 +4836,7 @@ public final ForkSubQueryProcessingCommandContext forkSubQueryProcessingCommand( try { enterOuterAlt(_localctx, 1); { - setState(642); + setState(648); processingCommand(); } } @@ -4872,27 +4897,27 @@ public final RerankCommandContext rerankCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(644); + setState(650); match(RERANK); - setState(648); + setState(654); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,48,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,49,_ctx) ) { case 1: { - setState(645); + setState(651); ((RerankCommandContext)_localctx).targetField = qualifiedName(); - setState(646); + setState(652); match(ASSIGN); } break; } - setState(650); + setState(656); ((RerankCommandContext)_localctx).queryText = constant(); - setState(651); + setState(657); match(ON); - setState(652); + setState(658); ((RerankCommandContext)_localctx).rerankFields = fields(); - setState(653); + setState(659); commandNamedParameters(); } } @@ -4948,23 +4973,23 @@ public final CompletionCommandContext completionCommand() throws RecognitionExce try { enterOuterAlt(_localctx, 1); { - setState(655); + setState(661); match(COMPLETION); - setState(659); + setState(665); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,49,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) { case 1: { - setState(656); + setState(662); ((CompletionCommandContext)_localctx).targetField = qualifiedName(); - setState(657); + setState(663); match(ASSIGN); } break; } - setState(661); + setState(667); ((CompletionCommandContext)_localctx).prompt = primaryExpression(0); - setState(662); + setState(668); commandNamedParameters(); } } @@ -5017,26 +5042,26 @@ public final InlineStatsCommandContext inlineStatsCommand() throws RecognitionEx InlineStatsCommandContext _localctx = new InlineStatsCommandContext(_ctx, getState()); enterRule(_localctx, 132, RULE_inlineStatsCommand); try { - setState(677); + setState(683); _errHandler.sync(this); switch (_input.LA(1)) { case INLINE: enterOuterAlt(_localctx, 1); { - setState(664); + setState(670); match(INLINE); - setState(665); + setState(671); match(INLINE_STATS); - setState(666); + setState(672); ((InlineStatsCommandContext)_localctx).stats = aggFields(); - setState(669); + setState(675); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) { case 1: { - setState(667); + setState(673); match(BY); - setState(668); + setState(674); ((InlineStatsCommandContext)_localctx).grouping = fields(); } break; @@ -5046,18 +5071,18 @@ public final InlineStatsCommandContext inlineStatsCommand() throws RecognitionEx case INLINESTATS: enterOuterAlt(_localctx, 2); { - setState(671); + setState(677); match(INLINESTATS); - setState(672); + setState(678); ((InlineStatsCommandContext)_localctx).stats = aggFields(); - setState(675); + setState(681); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,52,_ctx) ) { case 1: { - setState(673); + setState(679); match(BY); - setState(674); + setState(680); ((InlineStatsCommandContext)_localctx).grouping = fields(); } break; @@ -5119,33 +5144,33 @@ public final FuseCommandContext fuseCommand() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(679); + setState(685); match(FUSE); - setState(681); + setState(687); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,53,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,54,_ctx) ) { case 1: { - setState(680); + setState(686); ((FuseCommandContext)_localctx).fuseType = identifier(); } break; } - setState(686); + setState(692); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,54,_ctx); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(683); + setState(689); fuseConfiguration(); } } } - setState(688); + setState(694); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,54,_ctx); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); } } } @@ -5204,48 +5229,48 @@ public final FuseConfigurationContext fuseConfiguration() throws RecognitionExce FuseConfigurationContext _localctx = new FuseConfigurationContext(_ctx, getState()); enterRule(_localctx, 136, RULE_fuseConfiguration); try { - setState(700); + setState(706); _errHandler.sync(this); switch (_input.LA(1)) { case SCORE: enterOuterAlt(_localctx, 1); { - setState(689); + setState(695); match(SCORE); - setState(690); + setState(696); match(BY); - setState(691); + setState(697); ((FuseConfigurationContext)_localctx).score = qualifiedName(); } break; case KEY: enterOuterAlt(_localctx, 2); { - setState(692); + setState(698); match(KEY); - setState(693); + setState(699); match(BY); - setState(694); + setState(700); ((FuseConfigurationContext)_localctx).key = fuseKeyByFields(); } break; case GROUP: enterOuterAlt(_localctx, 3); { - setState(695); + setState(701); match(GROUP); - setState(696); + setState(702); match(BY); - setState(697); + setState(703); ((FuseConfigurationContext)_localctx).group = qualifiedName(); } break; case WITH: enterOuterAlt(_localctx, 4); { - setState(698); + setState(704); match(WITH); - setState(699); + setState(705); ((FuseConfigurationContext)_localctx).options = mapExpression(); } break; @@ -5303,25 +5328,25 @@ public final FuseKeyByFieldsContext fuseKeyByFields() throws RecognitionExceptio int _alt; enterOuterAlt(_localctx, 1); { - setState(702); + setState(708); qualifiedName(); - setState(707); + setState(713); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,56,_ctx); + _alt = getInterpreter().adaptivePredict(_input,57,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(703); + setState(709); match(COMMA); - setState(704); + setState(710); qualifiedName(); } } } - setState(709); + setState(715); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,56,_ctx); + _alt = getInterpreter().adaptivePredict(_input,57,_ctx); } } } @@ -5365,7 +5390,7 @@ public final MetricsInfoCommandContext metricsInfoCommand() throws RecognitionEx try { enterOuterAlt(_localctx, 1); { - setState(710); + setState(716); match(METRICS_INFO); } } @@ -5409,7 +5434,7 @@ public final TsInfoCommandContext tsInfoCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(712); + setState(718); match(TS_INFO); } } @@ -5462,13 +5487,13 @@ public final LookupCommandContext lookupCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(714); + setState(720); match(DEV_LOOKUP); - setState(715); + setState(721); ((LookupCommandContext)_localctx).tableName = indexPattern(); - setState(716); + setState(722); match(ON); - setState(717); + setState(723); ((LookupCommandContext)_localctx).matchFields = qualifiedNamePatterns(); } } @@ -5515,9 +5540,9 @@ public final InsistCommandContext insistCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(719); + setState(725); match(DEV_INSIST); - setState(720); + setState(726); qualifiedNamePatterns(); } } @@ -5568,13 +5593,13 @@ public final UriPartsCommandContext uriPartsCommand() throws RecognitionExceptio try { enterOuterAlt(_localctx, 1); { - setState(722); + setState(728); match(URI_PARTS); - setState(723); + setState(729); qualifiedName(); - setState(724); + setState(730); match(ASSIGN); - setState(725); + setState(731); primaryExpression(0); } } @@ -5625,13 +5650,13 @@ public final RegisteredDomainCommandContext registeredDomainCommand() throws Rec try { enterOuterAlt(_localctx, 1); { - setState(727); + setState(733); match(REGISTERED_DOMAIN); - setState(728); + setState(734); qualifiedName(); - setState(729); + setState(735); match(ASSIGN); - setState(730); + setState(736); primaryExpression(0); } } @@ -5679,11 +5704,11 @@ public final SetCommandContext setCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(732); + setState(738); match(SET); - setState(733); + setState(739); setField(); - setState(734); + setState(740); match(SEMICOLON); } } @@ -5736,11 +5761,11 @@ public final SetFieldContext setField() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(736); + setState(742); identifier(); - setState(737); + setState(743); match(ASSIGN); - setState(740); + setState(746); _errHandler.sync(this); switch (_input.LA(1)) { case QUOTED_STRING: @@ -5755,13 +5780,13 @@ public final SetFieldContext setField() throws RecognitionException { case NAMED_OR_POSITIONAL_PARAM: case OPENING_BRACKET: { - setState(738); + setState(744); constant(); } break; case LEFT_BRACES: { - setState(739); + setState(745); mapExpression(); } break; @@ -5827,27 +5852,27 @@ public final MmrCommandContext mmrCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(742); + setState(748); match(MMR); - setState(744); + setState(750); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,58,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) { case 1: { - setState(743); + setState(749); ((MmrCommandContext)_localctx).queryVector = mmrQueryVectorParams(); } break; } - setState(746); + setState(752); match(ON); - setState(747); + setState(753); ((MmrCommandContext)_localctx).diversifyField = qualifiedName(); - setState(748); + setState(754); match(MMR_LIMIT); - setState(749); + setState(755); ((MmrCommandContext)_localctx).limitValue = integerValue(); - setState(750); + setState(756); commandNamedParameters(); } } @@ -5923,14 +5948,14 @@ public final MmrQueryVectorParamsContext mmrQueryVectorParams() throws Recogniti MmrQueryVectorParamsContext _localctx = new MmrQueryVectorParamsContext(_ctx, getState()); enterRule(_localctx, 158, RULE_mmrQueryVectorParams); try { - setState(754); + setState(760); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,60,_ctx) ) { case 1: _localctx = new MmrQueryVectorParameterContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(752); + setState(758); parameter(); } break; @@ -5938,7 +5963,7 @@ public final MmrQueryVectorParamsContext mmrQueryVectorParams() throws Recogniti _localctx = new MmrQueryVectorExpressionContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(753); + setState(759); primaryExpression(0); } break; @@ -6156,18 +6181,18 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc int _alt; enterOuterAlt(_localctx, 1); { - setState(785); + setState(791); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,64,_ctx) ) { case 1: { _localctx = new LogicalNotContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(757); + setState(763); match(NOT); - setState(758); + setState(764); booleanExpression(8); } break; @@ -6176,7 +6201,7 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new BooleanDefaultContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(759); + setState(765); valueExpression(); } break; @@ -6185,7 +6210,7 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new RegexExpressionContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(760); + setState(766); regexBooleanExpression(); } break; @@ -6194,41 +6219,41 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new LogicalInContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(761); + setState(767); valueExpression(); - setState(763); + setState(769); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(762); + setState(768); match(NOT); } } - setState(765); + setState(771); match(IN); - setState(766); + setState(772); match(LP); - setState(767); + setState(773); valueExpression(); - setState(772); + setState(778); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(768); + setState(774); match(COMMA); - setState(769); + setState(775); valueExpression(); } } - setState(774); + setState(780); _errHandler.sync(this); _la = _input.LA(1); } - setState(775); + setState(781); match(RP); } break; @@ -6237,21 +6262,21 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new IsNullContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(777); + setState(783); valueExpression(); - setState(778); + setState(784); match(IS); - setState(780); + setState(786); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(779); + setState(785); match(NOT); } } - setState(782); + setState(788); match(NULL); } break; @@ -6260,33 +6285,33 @@ private BooleanExpressionContext booleanExpression(int _p) throws RecognitionExc _localctx = new MatchExpressionContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(784); + setState(790); matchBooleanExpression(); } break; } _ctx.stop = _input.LT(-1); - setState(795); + setState(801); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,65,_ctx); + _alt = getInterpreter().adaptivePredict(_input,66,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(793); + setState(799); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,64,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,65,_ctx) ) { case 1: { _localctx = new LogicalBinaryContext(new BooleanExpressionContext(_parentctx, _parentState)); ((LogicalBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression); - setState(787); + setState(793); if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); - setState(788); + setState(794); ((LogicalBinaryContext)_localctx).operator = match(AND); - setState(789); + setState(795); ((LogicalBinaryContext)_localctx).right = booleanExpression(6); } break; @@ -6295,20 +6320,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(790); + setState(796); if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); - setState(791); + setState(797); ((LogicalBinaryContext)_localctx).operator = match(OR); - setState(792); + setState(798); ((LogicalBinaryContext)_localctx).right = booleanExpression(5); } break; } } } - setState(797); + setState(803); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,65,_ctx); + _alt = getInterpreter().adaptivePredict(_input,66,_ctx); } } } @@ -6465,28 +6490,28 @@ public final RegexBooleanExpressionContext regexBooleanExpression() throws Recog enterRule(_localctx, 162, RULE_regexBooleanExpression); int _la; try { - setState(844); + setState(850); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,72,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,73,_ctx) ) { case 1: _localctx = new LikeExpressionContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(798); + setState(804); valueExpression(); - setState(800); + setState(806); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(799); + setState(805); match(NOT); } } - setState(802); + setState(808); match(LIKE); - setState(803); + setState(809); stringOrParameter(); } break; @@ -6494,21 +6519,21 @@ public final RegexBooleanExpressionContext regexBooleanExpression() throws Recog _localctx = new RlikeExpressionContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(805); + setState(811); valueExpression(); - setState(807); + setState(813); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(806); + setState(812); match(NOT); } } - setState(809); + setState(815); match(RLIKE); - setState(810); + setState(816); stringOrParameter(); } break; @@ -6516,41 +6541,41 @@ public final RegexBooleanExpressionContext regexBooleanExpression() throws Recog _localctx = new LikeListExpressionContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(812); + setState(818); valueExpression(); - setState(814); + setState(820); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(813); + setState(819); match(NOT); } } - setState(816); + setState(822); match(LIKE); - setState(817); + setState(823); match(LP); - setState(818); + setState(824); stringOrParameter(); - setState(823); + setState(829); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(819); + setState(825); match(COMMA); - setState(820); + setState(826); stringOrParameter(); } } - setState(825); + setState(831); _errHandler.sync(this); _la = _input.LA(1); } - setState(826); + setState(832); match(RP); } break; @@ -6558,41 +6583,41 @@ public final RegexBooleanExpressionContext regexBooleanExpression() throws Recog _localctx = new RlikeListExpressionContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(828); + setState(834); valueExpression(); - setState(830); + setState(836); _errHandler.sync(this); _la = _input.LA(1); if (_la==NOT) { { - setState(829); + setState(835); match(NOT); } } - setState(832); + setState(838); match(RLIKE); - setState(833); + setState(839); match(LP); - setState(834); + setState(840); stringOrParameter(); - setState(839); + setState(845); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(835); + setState(841); match(COMMA); - setState(836); + setState(842); stringOrParameter(); } } - setState(841); + setState(847); _errHandler.sync(this); _la = _input.LA(1); } - setState(842); + setState(848); match(RP); } break; @@ -6652,23 +6677,23 @@ public final MatchBooleanExpressionContext matchBooleanExpression() throws Recog try { enterOuterAlt(_localctx, 1); { - setState(846); + setState(852); ((MatchBooleanExpressionContext)_localctx).fieldExp = qualifiedName(); - setState(849); + setState(855); _errHandler.sync(this); _la = _input.LA(1); if (_la==CAST_OP) { { - setState(847); + setState(853); match(CAST_OP); - setState(848); + setState(854); ((MatchBooleanExpressionContext)_localctx).fieldType = dataType(); } } - setState(851); + setState(857); match(COLON); - setState(852); + setState(858); ((MatchBooleanExpressionContext)_localctx).matchQuery = constant(); } } @@ -6752,14 +6777,14 @@ public final ValueExpressionContext valueExpression() throws RecognitionExceptio ValueExpressionContext _localctx = new ValueExpressionContext(_ctx, getState()); enterRule(_localctx, 166, RULE_valueExpression); try { - setState(859); + setState(865); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,74,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { case 1: _localctx = new ValueExpressionDefaultContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(854); + setState(860); operatorExpression(0); } break; @@ -6767,11 +6792,11 @@ public final ValueExpressionContext valueExpression() throws RecognitionExceptio _localctx = new ComparisonContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(855); + setState(861); ((ComparisonContext)_localctx).left = operatorExpression(0); - setState(856); + setState(862); comparisonOperator(); - setState(857); + setState(863); ((ComparisonContext)_localctx).right = operatorExpression(0); } break; @@ -6896,16 +6921,16 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE int _alt; enterOuterAlt(_localctx, 1); { - setState(865); + setState(871); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,76,_ctx) ) { case 1: { _localctx = new OperatorExpressionDefaultContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(862); + setState(868); primaryExpression(0); } break; @@ -6914,7 +6939,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _localctx = new ArithmeticUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(863); + setState(869); ((ArithmeticUnaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { @@ -6925,31 +6950,31 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _errHandler.reportMatch(this); consume(); } - setState(864); + setState(870); operatorExpression(3); } break; } _ctx.stop = _input.LT(-1); - setState(875); + setState(881); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,77,_ctx); + _alt = getInterpreter().adaptivePredict(_input,78,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(873); + setState(879); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,76,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,77,_ctx) ) { case 1: { _localctx = new ArithmeticBinaryContext(new OperatorExpressionContext(_parentctx, _parentState)); ((ArithmeticBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_operatorExpression); - setState(867); + setState(873); if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(868); + setState(874); ((ArithmeticBinaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(((((_la - 95)) & ~0x3f) == 0 && ((1L << (_la - 95)) & 7L) != 0)) ) { @@ -6960,7 +6985,7 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _errHandler.reportMatch(this); consume(); } - setState(869); + setState(875); ((ArithmeticBinaryContext)_localctx).right = operatorExpression(3); } break; @@ -6969,9 +6994,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(870); + setState(876); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(871); + setState(877); ((ArithmeticBinaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { @@ -6982,16 +7007,16 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE _errHandler.reportMatch(this); consume(); } - setState(872); + setState(878); ((ArithmeticBinaryContext)_localctx).right = operatorExpression(2); } break; } } } - setState(877); + setState(883); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,77,_ctx); + _alt = getInterpreter().adaptivePredict(_input,78,_ctx); } } } @@ -7147,16 +7172,16 @@ private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionExc int _alt; enterOuterAlt(_localctx, 1); { - setState(886); + setState(892); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,78,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,79,_ctx) ) { case 1: { _localctx = new ConstantDefaultContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(879); + setState(885); constant(); } break; @@ -7165,7 +7190,7 @@ private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionExc _localctx = new DereferenceContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(880); + setState(886); qualifiedName(); } break; @@ -7174,7 +7199,7 @@ private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionExc _localctx = new FunctionContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(881); + setState(887); functionExpression(); } break; @@ -7183,19 +7208,19 @@ private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionExc _localctx = new ParenthesizedExpressionContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(882); + setState(888); match(LP); - setState(883); + setState(889); booleanExpression(0); - setState(884); + setState(890); match(RP); } break; } _ctx.stop = _input.LT(-1); - setState(893); + setState(899); _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 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); @@ -7204,18 +7229,18 @@ private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionExc { _localctx = new InlineCastContext(new PrimaryExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_primaryExpression); - setState(888); + setState(894); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(889); + setState(895); match(CAST_OP); - setState(890); + setState(896); dataType(); } } } - setState(895); + setState(901); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); } } } @@ -7279,50 +7304,50 @@ public final FunctionExpressionContext functionExpression() throws RecognitionEx int _alt; enterOuterAlt(_localctx, 1); { - setState(896); + setState(902); functionName(); - setState(897); + setState(903); match(LP); - setState(911); + setState(917); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,82,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,83,_ctx) ) { case 1: { - setState(898); + setState(904); match(ASTERISK); } break; case 2: { { - setState(899); + setState(905); booleanExpression(0); - setState(904); + setState(910); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,80,_ctx); + _alt = getInterpreter().adaptivePredict(_input,81,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(900); + setState(906); match(COMMA); - setState(901); + setState(907); booleanExpression(0); } } } - setState(906); + setState(912); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,80,_ctx); + _alt = getInterpreter().adaptivePredict(_input,81,_ctx); } - setState(909); + setState(915); _errHandler.sync(this); _la = _input.LA(1); if (_la==COMMA) { { - setState(907); + setState(913); match(COMMA); - setState(908); + setState(914); mapExpression(); } } @@ -7331,7 +7356,7 @@ public final FunctionExpressionContext functionExpression() throws RecognitionEx } break; } - setState(913); + setState(919); match(RP); } } @@ -7377,7 +7402,7 @@ public final FunctionNameContext functionName() throws RecognitionException { FunctionNameContext _localctx = new FunctionNameContext(_ctx, getState()); enterRule(_localctx, 174, RULE_functionName); try { - setState(918); + setState(924); _errHandler.sync(this); switch (_input.LA(1)) { case PARAM: @@ -7388,21 +7413,21 @@ public final FunctionNameContext functionName() throws RecognitionException { case QUOTED_IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(915); + setState(921); identifierOrParameter(); } break; case FIRST: enterOuterAlt(_localctx, 2); { - setState(916); + setState(922); match(FIRST); } break; case LAST: enterOuterAlt(_localctx, 3); { - setState(917); + setState(923); match(LAST); } break; @@ -7462,35 +7487,35 @@ public final MapExpressionContext mapExpression() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(920); + setState(926); match(LEFT_BRACES); - setState(929); + setState(935); _errHandler.sync(this); _la = _input.LA(1); if (_la==QUOTED_STRING) { { - setState(921); + setState(927); entryExpression(); - setState(926); + setState(932); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(922); + setState(928); match(COMMA); - setState(923); + setState(929); entryExpression(); } } - setState(928); + setState(934); _errHandler.sync(this); _la = _input.LA(1); } } } - setState(931); + setState(937); match(RIGHT_BRACES); } } @@ -7542,11 +7567,11 @@ public final EntryExpressionContext entryExpression() throws RecognitionExceptio try { enterOuterAlt(_localctx, 1); { - setState(933); + setState(939); ((EntryExpressionContext)_localctx).key = string(); - setState(934); + setState(940); match(COLON); - setState(935); + setState(941); ((EntryExpressionContext)_localctx).value = mapValue(); } } @@ -7593,7 +7618,7 @@ public final MapValueContext mapValue() throws RecognitionException { MapValueContext _localctx = new MapValueContext(_ctx, getState()); enterRule(_localctx, 180, RULE_mapValue); try { - setState(939); + setState(945); _errHandler.sync(this); switch (_input.LA(1)) { case QUOTED_STRING: @@ -7609,14 +7634,14 @@ public final MapValueContext mapValue() throws RecognitionException { case OPENING_BRACKET: enterOuterAlt(_localctx, 1); { - setState(937); + setState(943); constant(); } break; case LEFT_BRACES: enterOuterAlt(_localctx, 2); { - setState(938); + setState(944); mapExpression(); } break; @@ -7891,14 +7916,14 @@ public final ConstantContext constant() throws RecognitionException { enterRule(_localctx, 182, RULE_constant); int _la; try { - setState(983); + setState(989); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,91,_ctx) ) { case 1: _localctx = new NullLiteralContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(941); + setState(947); match(NULL); } break; @@ -7906,9 +7931,9 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new QualifiedIntegerLiteralContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(942); + setState(948); integerValue(); - setState(943); + setState(949); match(UNQUOTED_IDENTIFIER); } break; @@ -7916,7 +7941,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new DecimalLiteralContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(945); + setState(951); decimalValue(); } break; @@ -7924,7 +7949,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new IntegerLiteralContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(946); + setState(952); integerValue(); } break; @@ -7932,7 +7957,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new BooleanLiteralContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(947); + setState(953); booleanValue(); } break; @@ -7940,7 +7965,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new InputParameterContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(948); + setState(954); parameter(); } break; @@ -7948,7 +7973,7 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new StringLiteralContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(949); + setState(955); string(); } break; @@ -7956,27 +7981,27 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new NumericArrayLiteralContext(_localctx); enterOuterAlt(_localctx, 8); { - setState(950); + setState(956); match(OPENING_BRACKET); - setState(951); + setState(957); numericValue(); - setState(956); + setState(962); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(952); + setState(958); match(COMMA); - setState(953); + setState(959); numericValue(); } } - setState(958); + setState(964); _errHandler.sync(this); _la = _input.LA(1); } - setState(959); + setState(965); match(CLOSING_BRACKET); } break; @@ -7984,27 +8009,27 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new BooleanArrayLiteralContext(_localctx); enterOuterAlt(_localctx, 9); { - setState(961); + setState(967); match(OPENING_BRACKET); - setState(962); + setState(968); booleanValue(); - setState(967); + setState(973); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(963); + setState(969); match(COMMA); - setState(964); + setState(970); booleanValue(); } } - setState(969); + setState(975); _errHandler.sync(this); _la = _input.LA(1); } - setState(970); + setState(976); match(CLOSING_BRACKET); } break; @@ -8012,27 +8037,27 @@ public final ConstantContext constant() throws RecognitionException { _localctx = new StringArrayLiteralContext(_localctx); enterOuterAlt(_localctx, 10); { - setState(972); + setState(978); match(OPENING_BRACKET); - setState(973); + setState(979); string(); - setState(978); + setState(984); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(974); + setState(980); match(COMMA); - setState(975); + setState(981); string(); } } - setState(980); + setState(986); _errHandler.sync(this); _la = _input.LA(1); } - setState(981); + setState(987); match(CLOSING_BRACKET); } break; @@ -8080,7 +8105,7 @@ public final BooleanValueContext booleanValue() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(985); + setState(991); _la = _input.LA(1); if ( !(_la==FALSE || _la==TRUE) ) { _errHandler.recoverInline(this); @@ -8135,20 +8160,20 @@ public final NumericValueContext numericValue() throws RecognitionException { NumericValueContext _localctx = new NumericValueContext(_ctx, getState()); enterRule(_localctx, 186, RULE_numericValue); try { - setState(989); + setState(995); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,91,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,92,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(987); + setState(993); decimalValue(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(988); + setState(994); integerValue(); } break; @@ -8197,12 +8222,12 @@ public final DecimalValueContext decimalValue() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(992); + setState(998); _errHandler.sync(this); _la = _input.LA(1); if (_la==PLUS || _la==MINUS) { { - setState(991); + setState(997); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { _errHandler.recoverInline(this); @@ -8215,7 +8240,7 @@ public final DecimalValueContext decimalValue() throws RecognitionException { } } - setState(994); + setState(1000); match(DECIMAL_LITERAL); } } @@ -8262,12 +8287,12 @@ public final IntegerValueContext integerValue() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(997); + setState(1003); _errHandler.sync(this); _la = _input.LA(1); if (_la==PLUS || _la==MINUS) { { - setState(996); + setState(1002); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { _errHandler.recoverInline(this); @@ -8280,7 +8305,7 @@ public final IntegerValueContext integerValue() throws RecognitionException { } } - setState(999); + setState(1005); match(INTEGER_LITERAL); } } @@ -8324,7 +8349,7 @@ public final StringContext string() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(1001); + setState(1007); match(QUOTED_STRING); } } @@ -8374,7 +8399,7 @@ public final ComparisonOperatorContext comparisonOperator() throws RecognitionEx try { enterOuterAlt(_localctx, 1); { - setState(1003); + setState(1009); _la = _input.LA(1); if ( !(((((_la - 86)) & ~0x3f) == 0 && ((1L << (_la - 86)) & 125L) != 0)) ) { _errHandler.recoverInline(this); @@ -8437,7 +8462,7 @@ public final JoinCommandContext joinCommand() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(1005); + setState(1011); ((JoinCommandContext)_localctx).type = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 6979321856L) != 0)) ) { @@ -8448,11 +8473,11 @@ public final JoinCommandContext joinCommand() throws RecognitionException { _errHandler.reportMatch(this); consume(); } - setState(1006); + setState(1012); match(JOIN); - setState(1007); + setState(1013); joinTarget(); - setState(1008); + setState(1014); joinCondition(); } } @@ -8501,34 +8526,34 @@ public final JoinTargetContext joinTarget() throws RecognitionException { enterRule(_localctx, 198, RULE_joinTarget); int _la; try { - setState(1018); + setState(1024); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,95,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(1010); + setState(1016); if (!(this.isDevVersion())) throw new FailedPredicateException(this, "this.isDevVersion()"); - setState(1011); + setState(1017); ((JoinTargetContext)_localctx).index = indexPattern(); - setState(1013); + setState(1019); _errHandler.sync(this); _la = _input.LA(1); if (_la==AS) { { - setState(1012); + setState(1018); match(AS); } } - setState(1015); + setState(1021); ((JoinTargetContext)_localctx).qualifier = match(UNQUOTED_SOURCE); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(1017); + setState(1023); ((JoinTargetContext)_localctx).index = indexPattern(); } break; @@ -8585,27 +8610,27 @@ public final JoinConditionContext joinCondition() throws RecognitionException { int _alt; enterOuterAlt(_localctx, 1); { - setState(1020); + setState(1026); match(ON); - setState(1021); + setState(1027); booleanExpression(0); - setState(1026); + setState(1032); _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(1028); match(COMMA); - setState(1023); + setState(1029); booleanExpression(0); } } } - setState(1028); + setState(1034); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,96,_ctx); + _alt = getInterpreter().adaptivePredict(_input,97,_ctx); } } } @@ -8667,84 +8692,84 @@ public final PromqlCommandContext promqlCommand() throws RecognitionException { int _la; try { int _alt; - setState(1061); + setState(1067); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,102,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,103,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(1029); + setState(1035); match(PROMQL); - setState(1033); + setState(1039); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,97,_ctx); + _alt = getInterpreter().adaptivePredict(_input,98,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(1030); + setState(1036); promqlParam(); } } } - setState(1035); + setState(1041); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,97,_ctx); + _alt = getInterpreter().adaptivePredict(_input,98,_ctx); } - setState(1039); + setState(1045); _errHandler.sync(this); _la = _input.LA(1); if (_la==UNQUOTED_IDENTIFIER || _la==QUOTED_IDENTIFIER) { { - setState(1036); + setState(1042); valueName(); - setState(1037); + setState(1043); match(ASSIGN); } } - setState(1041); + setState(1047); match(LP); - setState(1043); + setState(1049); _errHandler.sync(this); _la = _input.LA(1); do { { { - setState(1042); + setState(1048); promqlQueryPart(); } } - setState(1045); + setState(1051); _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(1047); + setState(1053); match(RP); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(1049); + setState(1055); match(PROMQL); - setState(1053); + 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 ) { if ( _alt==1 ) { { { - setState(1050); + setState(1056); promqlParam(); } } } - setState(1055); + setState(1061); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,100,_ctx); + _alt = getInterpreter().adaptivePredict(_input,101,_ctx); } - setState(1057); + setState(1063); _errHandler.sync(this); _alt = 1; do { @@ -8752,7 +8777,7 @@ public final PromqlCommandContext promqlCommand() throws RecognitionException { case 1: { { - setState(1056); + setState(1062); promqlQueryPart(); } } @@ -8760,9 +8785,9 @@ public final PromqlCommandContext promqlCommand() throws RecognitionException { default: throw new NoViableAltException(this); } - setState(1059); + setState(1065); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,101,_ctx); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; @@ -8810,7 +8835,7 @@ public final ValueNameContext valueName() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(1063); + setState(1069); _la = _input.LA(1); if ( !(_la==UNQUOTED_IDENTIFIER || _la==QUOTED_IDENTIFIER) ) { _errHandler.recoverInline(this); @@ -8870,11 +8895,11 @@ public final PromqlParamContext promqlParam() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(1065); + setState(1071); ((PromqlParamContext)_localctx).name = promqlParamName(); - setState(1066); + setState(1072); match(ASSIGN); - setState(1067); + setState(1073); ((PromqlParamContext)_localctx).value = promqlParamValue(); } } @@ -8922,7 +8947,7 @@ public final PromqlParamNameContext promqlParamName() throws RecognitionExceptio try { enterOuterAlt(_localctx, 1); { - setState(1069); + setState(1075); _la = _input.LA(1); if ( !(((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & 1697645953286145L) != 0)) ) { _errHandler.recoverInline(this); @@ -8984,7 +9009,7 @@ public final PromqlParamValueContext promqlParamValue() throws RecognitionExcept enterRule(_localctx, 210, RULE_promqlParamValue); try { int _alt; - setState(1081); + setState(1087); _errHandler.sync(this); switch (_input.LA(1)) { case QUOTED_STRING: @@ -8992,39 +9017,39 @@ public final PromqlParamValueContext promqlParamValue() throws RecognitionExcept case UNQUOTED_SOURCE: enterOuterAlt(_localctx, 1); { - setState(1071); + setState(1077); promqlIndexPattern(); - setState(1076); + setState(1082); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,103,_ctx); + _alt = getInterpreter().adaptivePredict(_input,104,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(1072); + setState(1078); match(COMMA); - setState(1073); + setState(1079); promqlIndexPattern(); } } } - setState(1078); + setState(1084); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,103,_ctx); + _alt = getInterpreter().adaptivePredict(_input,104,_ctx); } } break; case QUOTED_IDENTIFIER: enterOuterAlt(_localctx, 2); { - setState(1079); + setState(1085); match(QUOTED_IDENTIFIER); } break; case NAMED_OR_POSITIONAL_PARAM: enterOuterAlt(_localctx, 3); { - setState(1080); + setState(1086); match(NAMED_OR_POSITIONAL_PARAM); } break; @@ -9084,7 +9109,7 @@ public final PromqlQueryContentContext promqlQueryContent() throws RecognitionEx try { enterOuterAlt(_localctx, 1); { - setState(1083); + setState(1089); _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); @@ -9149,7 +9174,7 @@ public final PromqlQueryPartContext promqlQueryPart() throws RecognitionExceptio int _la; try { int _alt; - setState(1098); + setState(1104); _errHandler.sync(this); switch (_input.LA(1)) { case QUOTED_STRING: @@ -9166,7 +9191,7 @@ public final PromqlQueryPartContext promqlQueryPart() throws RecognitionExceptio case PROMQL_OTHER_QUERY_CONTENT: enterOuterAlt(_localctx, 1); { - setState(1086); + setState(1092); _errHandler.sync(this); _alt = 1; do { @@ -9174,7 +9199,7 @@ public final PromqlQueryPartContext promqlQueryPart() throws RecognitionExceptio case 1: { { - setState(1085); + setState(1091); promqlQueryContent(); } } @@ -9182,32 +9207,32 @@ public final PromqlQueryPartContext promqlQueryPart() throws RecognitionExceptio default: throw new NoViableAltException(this); } - setState(1088); + setState(1094); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,105,_ctx); + _alt = getInterpreter().adaptivePredict(_input,106,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; case LP: enterOuterAlt(_localctx, 2); { - setState(1090); + setState(1096); match(LP); - setState(1094); + setState(1100); _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(1091); + setState(1097); promqlQueryPart(); } } - setState(1096); + setState(1102); _errHandler.sync(this); _la = _input.LA(1); } - setState(1097); + setState(1103); match(RP); } break; @@ -9266,35 +9291,35 @@ public final PromqlIndexPatternContext promqlIndexPattern() throws RecognitionEx PromqlIndexPatternContext _localctx = new PromqlIndexPatternContext(_ctx, getState()); enterRule(_localctx, 216, RULE_promqlIndexPattern); try { - setState(1109); + setState(1115); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,108,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,109,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(1100); + setState(1106); promqlClusterString(); - setState(1101); + setState(1107); match(COLON); - setState(1102); + setState(1108); promqlUnquotedIndexString(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(1104); + setState(1110); promqlUnquotedIndexString(); - setState(1105); + setState(1111); match(CAST_OP); - setState(1106); + setState(1112); promqlSelectorString(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(1108); + setState(1114); promqlIndexString(); } break; @@ -9342,7 +9367,7 @@ public final PromqlClusterStringContext promqlClusterString() throws Recognition try { enterOuterAlt(_localctx, 1); { - setState(1111); + setState(1117); _la = _input.LA(1); if ( !(_la==UNQUOTED_IDENTIFIER || _la==UNQUOTED_SOURCE) ) { _errHandler.recoverInline(this); @@ -9396,7 +9421,7 @@ public final PromqlSelectorStringContext promqlSelectorString() throws Recogniti try { enterOuterAlt(_localctx, 1); { - setState(1113); + setState(1119); _la = _input.LA(1); if ( !(_la==UNQUOTED_IDENTIFIER || _la==UNQUOTED_SOURCE) ) { _errHandler.recoverInline(this); @@ -9450,7 +9475,7 @@ public final PromqlUnquotedIndexStringContext promqlUnquotedIndexString() throws try { enterOuterAlt(_localctx, 1); { - setState(1115); + setState(1121); _la = _input.LA(1); if ( !(_la==UNQUOTED_IDENTIFIER || _la==UNQUOTED_SOURCE) ) { _errHandler.recoverInline(this); @@ -9505,7 +9530,7 @@ public final PromqlIndexStringContext promqlIndexString() throws RecognitionExce try { enterOuterAlt(_localctx, 1); { - setState(1117); + setState(1123); _la = _input.LA(1); if ( !(((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & 36591746972385281L) != 0)) ) { _errHandler.recoverInline(this); @@ -9651,7 +9676,7 @@ private boolean joinTarget_sempred(JoinTargetContext _localctx, int predIndex) { } public static final String _serializedATN = - "\u0004\u0001\u00a8\u0460\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001"+ + "\u0004\u0001\u00a8\u0466\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"+ @@ -9717,632 +9742,635 @@ private boolean joinTarget_sempred(JoinTargetContext _localctx, int predIndex) { "\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"+ + "%\u0001&\u0001&\u0001&\u0001&\u0001&\u0005&\u01ec\b&\n&\f&\u01ef\t&\u0001"+ + "\'\u0001\'\u0001\'\u0001\'\u0005\'\u01f5\b\'\n\'\f\'\u01f8\t\'\u0001("+ + "\u0001(\u0003(\u01fc\b(\u0001(\u0001(\u0003(\u0200\b(\u0001)\u0001)\u0001"+ + ")\u0001*\u0001*\u0001*\u0001+\u0001+\u0001+\u0001+\u0005+\u020c\b+\n+"+ + "\f+\u020f\t+\u0001,\u0001,\u0001,\u0001,\u0001,\u0001,\u0001,\u0001,\u0003"+ + ",\u0219\b,\u0001-\u0001-\u0001-\u0001-\u0003-\u021f\b-\u0001.\u0001.\u0001"+ + ".\u0005.\u0224\b.\n.\f.\u0227\t.\u0001/\u0001/\u0001/\u0001/\u00010\u0001"+ + "0\u00030\u022f\b0\u00011\u00011\u00011\u00011\u00011\u00051\u0236\b1\n"+ + "1\f1\u0239\t1\u00012\u00012\u00012\u00013\u00013\u00013\u00014\u00014"+ + "\u00014\u00014\u00015\u00015\u00015\u00016\u00016\u00016\u00016\u0003"+ + "6\u024c\b6\u00016\u00016\u00016\u00016\u00056\u0252\b6\n6\f6\u0255\t6"+ + "\u00036\u0257\b6\u00017\u00017\u00018\u00018\u00018\u00038\u025e\b8\u0001"+ + "8\u00018\u00019\u00019\u00019\u0001:\u0001:\u0001:\u0001:\u0003:\u0269"+ + "\b:\u0001:\u0001:\u0001:\u0001:\u0001:\u0003:\u0270\b:\u0001;\u0001;\u0001"+ + ";\u0001<\u0004<\u0276\b<\u000b<\f<\u0277\u0001=\u0001=\u0001=\u0001=\u0001"+ + ">\u0001>\u0001>\u0001>\u0001>\u0001>\u0005>\u0284\b>\n>\f>\u0287\t>\u0001"+ + "?\u0001?\u0001@\u0001@\u0001@\u0001@\u0003@\u028f\b@\u0001@\u0001@\u0001"+ + "@\u0001@\u0001@\u0001A\u0001A\u0001A\u0001A\u0003A\u029a\bA\u0001A\u0001"+ + "A\u0001A\u0001B\u0001B\u0001B\u0001B\u0001B\u0003B\u02a4\bB\u0001B\u0001"+ + "B\u0001B\u0001B\u0003B\u02aa\bB\u0003B\u02ac\bB\u0001C\u0001C\u0003C\u02b0"+ + "\bC\u0001C\u0005C\u02b3\bC\nC\fC\u02b6\tC\u0001D\u0001D\u0001D\u0001D"+ + "\u0001D\u0001D\u0001D\u0001D\u0001D\u0001D\u0001D\u0003D\u02c3\bD\u0001"+ + "E\u0001E\u0001E\u0005E\u02c8\bE\nE\fE\u02cb\tE\u0001F\u0001F\u0001G\u0001"+ + "G\u0001H\u0001H\u0001H\u0001H\u0001H\u0001I\u0001I\u0001I\u0001J\u0001"+ + "J\u0001J\u0001J\u0001J\u0001K\u0001K\u0001K\u0001K\u0001K\u0001L\u0001"+ + "L\u0001L\u0001L\u0001M\u0001M\u0001M\u0001M\u0003M\u02eb\bM\u0001N\u0001"+ + "N\u0003N\u02ef\bN\u0001N\u0001N\u0001N\u0001N\u0001N\u0001N\u0001O\u0001"+ + "O\u0003O\u02f9\bO\u0001P\u0001P\u0001P\u0001P\u0001P\u0001P\u0001P\u0003"+ + "P\u0302\bP\u0001P\u0001P\u0001P\u0001P\u0001P\u0005P\u0309\bP\nP\fP\u030c"+ + "\tP\u0001P\u0001P\u0001P\u0001P\u0001P\u0003P\u0313\bP\u0001P\u0001P\u0001"+ + "P\u0003P\u0318\bP\u0001P\u0001P\u0001P\u0001P\u0001P\u0001P\u0005P\u0320"+ + "\bP\nP\fP\u0323\tP\u0001Q\u0001Q\u0003Q\u0327\bQ\u0001Q\u0001Q\u0001Q"+ + "\u0001Q\u0001Q\u0003Q\u032e\bQ\u0001Q\u0001Q\u0001Q\u0001Q\u0001Q\u0003"+ + "Q\u0335\bQ\u0001Q\u0001Q\u0001Q\u0001Q\u0001Q\u0005Q\u033c\bQ\nQ\fQ\u033f"+ + "\tQ\u0001Q\u0001Q\u0001Q\u0001Q\u0003Q\u0345\bQ\u0001Q\u0001Q\u0001Q\u0001"+ + "Q\u0001Q\u0005Q\u034c\bQ\nQ\fQ\u034f\tQ\u0001Q\u0001Q\u0003Q\u0353\bQ"+ + "\u0001R\u0001R\u0001R\u0003R\u0358\bR\u0001R\u0001R\u0001R\u0001S\u0001"+ + "S\u0001S\u0001S\u0001S\u0003S\u0362\bS\u0001T\u0001T\u0001T\u0001T\u0003"+ + "T\u0368\bT\u0001T\u0001T\u0001T\u0001T\u0001T\u0001T\u0005T\u0370\bT\n"+ + "T\fT\u0373\tT\u0001U\u0001U\u0001U\u0001U\u0001U\u0001U\u0001U\u0001U"+ + "\u0003U\u037d\bU\u0001U\u0001U\u0001U\u0005U\u0382\bU\nU\fU\u0385\tU\u0001"+ + "V\u0001V\u0001V\u0001V\u0001V\u0001V\u0005V\u038d\bV\nV\fV\u0390\tV\u0001"+ + "V\u0001V\u0003V\u0394\bV\u0003V\u0396\bV\u0001V\u0001V\u0001W\u0001W\u0001"+ + "W\u0003W\u039d\bW\u0001X\u0001X\u0001X\u0001X\u0005X\u03a3\bX\nX\fX\u03a6"+ + "\tX\u0003X\u03a8\bX\u0001X\u0001X\u0001Y\u0001Y\u0001Y\u0001Y\u0001Z\u0001"+ + "Z\u0003Z\u03b2\bZ\u0001[\u0001[\u0001[\u0001[\u0001[\u0001[\u0001[\u0001"+ + "[\u0001[\u0001[\u0001[\u0001[\u0001[\u0005[\u03c1\b[\n[\f[\u03c4\t[\u0001"+ + "[\u0001[\u0001[\u0001[\u0001[\u0001[\u0005[\u03cc\b[\n[\f[\u03cf\t[\u0001"+ + "[\u0001[\u0001[\u0001[\u0001[\u0001[\u0005[\u03d7\b[\n[\f[\u03da\t[\u0001"+ + "[\u0001[\u0003[\u03de\b[\u0001\\\u0001\\\u0001]\u0001]\u0003]\u03e4\b"+ + "]\u0001^\u0003^\u03e7\b^\u0001^\u0001^\u0001_\u0003_\u03ec\b_\u0001_\u0001"+ + "_\u0001`\u0001`\u0001a\u0001a\u0001b\u0001b\u0001b\u0001b\u0001b\u0001"+ + "c\u0001c\u0001c\u0003c\u03fc\bc\u0001c\u0001c\u0001c\u0003c\u0401\bc\u0001"+ + "d\u0001d\u0001d\u0001d\u0005d\u0407\bd\nd\fd\u040a\td\u0001e\u0001e\u0005"+ + "e\u040e\be\ne\fe\u0411\te\u0001e\u0001e\u0001e\u0003e\u0416\be\u0001e"+ + "\u0001e\u0004e\u041a\be\u000be\fe\u041b\u0001e\u0001e\u0001e\u0001e\u0005"+ + "e\u0422\be\ne\fe\u0425\te\u0001e\u0004e\u0428\be\u000be\fe\u0429\u0003"+ + "e\u042c\be\u0001f\u0001f\u0001g\u0001g\u0001g\u0001g\u0001h\u0001h\u0001"+ + "i\u0001i\u0001i\u0005i\u0439\bi\ni\fi\u043c\ti\u0001i\u0001i\u0003i\u0440"+ + "\bi\u0001j\u0001j\u0001k\u0004k\u0445\bk\u000bk\fk\u0446\u0001k\u0001"+ + "k\u0005k\u044b\bk\nk\fk\u044e\tk\u0001k\u0003k\u0451\bk\u0001l\u0001l"+ + "\u0001l\u0001l\u0001l\u0001l\u0001l\u0001l\u0001l\u0003l\u045c\bl\u0001"+ + "m\u0001m\u0001n\u0001n\u0001o\u0001o\u0001p\u0001p\u0001p\u0000\u0005"+ + "\u0004|\u00a0\u00a8\u00aaq\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::??ABDDeeklqq\u009b\u009d\u0002\u0000kkqq\u0003\u0000"+ + "::kkqq\u0498\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\u00000\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\u0000"+ + "J\u01e1\u0001\u0000\u0000\u0000L\u01e6\u0001\u0000\u0000\u0000N\u01f0"+ + "\u0001\u0000\u0000\u0000P\u01f9\u0001\u0000\u0000\u0000R\u0201\u0001\u0000"+ + "\u0000\u0000T\u0204\u0001\u0000\u0000\u0000V\u0207\u0001\u0000\u0000\u0000"+ + "X\u0218\u0001\u0000\u0000\u0000Z\u021a\u0001\u0000\u0000\u0000\\\u0220"+ + "\u0001\u0000\u0000\u0000^\u0228\u0001\u0000\u0000\u0000`\u022e\u0001\u0000"+ + "\u0000\u0000b\u0230\u0001\u0000\u0000\u0000d\u023a\u0001\u0000\u0000\u0000"+ + "f\u023d\u0001\u0000\u0000\u0000h\u0240\u0001\u0000\u0000\u0000j\u0244"+ + "\u0001\u0000\u0000\u0000l\u0247\u0001\u0000\u0000\u0000n\u0258\u0001\u0000"+ + "\u0000\u0000p\u025d\u0001\u0000\u0000\u0000r\u0261\u0001\u0000\u0000\u0000"+ + "t\u0264\u0001\u0000\u0000\u0000v\u0271\u0001\u0000\u0000\u0000x\u0275"+ + "\u0001\u0000\u0000\u0000z\u0279\u0001\u0000\u0000\u0000|\u027d\u0001\u0000"+ + "\u0000\u0000~\u0288\u0001\u0000\u0000\u0000\u0080\u028a\u0001\u0000\u0000"+ + "\u0000\u0082\u0295\u0001\u0000\u0000\u0000\u0084\u02ab\u0001\u0000\u0000"+ + "\u0000\u0086\u02ad\u0001\u0000\u0000\u0000\u0088\u02c2\u0001\u0000\u0000"+ + "\u0000\u008a\u02c4\u0001\u0000\u0000\u0000\u008c\u02cc\u0001\u0000\u0000"+ + "\u0000\u008e\u02ce\u0001\u0000\u0000\u0000\u0090\u02d0\u0001\u0000\u0000"+ + "\u0000\u0092\u02d5\u0001\u0000\u0000\u0000\u0094\u02d8\u0001\u0000\u0000"+ + "\u0000\u0096\u02dd\u0001\u0000\u0000\u0000\u0098\u02e2\u0001\u0000\u0000"+ + "\u0000\u009a\u02e6\u0001\u0000\u0000\u0000\u009c\u02ec\u0001\u0000\u0000"+ + "\u0000\u009e\u02f8\u0001\u0000\u0000\u0000\u00a0\u0317\u0001\u0000\u0000"+ + "\u0000\u00a2\u0352\u0001\u0000\u0000\u0000\u00a4\u0354\u0001\u0000\u0000"+ + "\u0000\u00a6\u0361\u0001\u0000\u0000\u0000\u00a8\u0367\u0001\u0000\u0000"+ + "\u0000\u00aa\u037c\u0001\u0000\u0000\u0000\u00ac\u0386\u0001\u0000\u0000"+ + "\u0000\u00ae\u039c\u0001\u0000\u0000\u0000\u00b0\u039e\u0001\u0000\u0000"+ + "\u0000\u00b2\u03ab\u0001\u0000\u0000\u0000\u00b4\u03b1\u0001\u0000\u0000"+ + "\u0000\u00b6\u03dd\u0001\u0000\u0000\u0000\u00b8\u03df\u0001\u0000\u0000"+ + "\u0000\u00ba\u03e3\u0001\u0000\u0000\u0000\u00bc\u03e6\u0001\u0000\u0000"+ + "\u0000\u00be\u03eb\u0001\u0000\u0000\u0000\u00c0\u03ef\u0001\u0000\u0000"+ + "\u0000\u00c2\u03f1\u0001\u0000\u0000\u0000\u00c4\u03f3\u0001\u0000\u0000"+ + "\u0000\u00c6\u0400\u0001\u0000\u0000\u0000\u00c8\u0402\u0001\u0000\u0000"+ + "\u0000\u00ca\u042b\u0001\u0000\u0000\u0000\u00cc\u042d\u0001\u0000\u0000"+ + "\u0000\u00ce\u042f\u0001\u0000\u0000\u0000\u00d0\u0433\u0001\u0000\u0000"+ + "\u0000\u00d2\u043f\u0001\u0000\u0000\u0000\u00d4\u0441\u0001\u0000\u0000"+ + "\u0000\u00d6\u0450\u0001\u0000\u0000\u0000\u00d8\u045b\u0001\u0000\u0000"+ + "\u0000\u00da\u045d\u0001\u0000\u0000\u0000\u00dc\u045f\u0001\u0000\u0000"+ + "\u0000\u00de\u0461\u0001\u0000\u0000\u0000\u00e0\u0463\u0001\u0000\u0000"+ + "\u0000\u00e2\u00e4\u0003\u0098L\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\u0003"+ + "T*\u0000\u010b\u0122\u0003V+\u0000\u010c\u0122\u0003Z-\u0000\u010d\u0122"+ + "\u0003b1\u0000\u010e\u0122\u0003l6\u0000\u010f\u0122\u0003d2\u0000\u0110"+ + "\u0122\u0003\u00c4b\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\u009cN\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\u0005D\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\u0005"+ + "B\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\u0005"+ + "q\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\u0005"+ + "q\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\u00032\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\u01a2"+ + "5\u0001\u0000\u0000\u0000\u01a3\u01a8\u0003F#\u0000\u01a4\u01a5\u0005"+ + "F\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\u01ed\u0003\u00a0P\u0000"+ + "\u01e9\u01ea\u0005D\u0000\u0000\u01ea\u01ec\u0003\u00a0P\u0000\u01eb\u01e9"+ + "\u0001\u0000\u0000\u0000\u01ec\u01ef\u0001\u0000\u0000\u0000\u01ed\u01eb"+ + "\u0001\u0000\u0000\u0000\u01ed\u01ee\u0001\u0000\u0000\u0000\u01eeM\u0001"+ + "\u0000\u0000\u0000\u01ef\u01ed\u0001\u0000\u0000\u0000\u01f0\u01f1\u0005"+ + "\u000f\u0000\u0000\u01f1\u01f6\u0003P(\u0000\u01f2\u01f3\u0005D\u0000"+ + "\u0000\u01f3\u01f5\u0003P(\u0000\u01f4\u01f2\u0001\u0000\u0000\u0000\u01f5"+ + "\u01f8\u0001\u0000\u0000\u0000\u01f6\u01f4\u0001\u0000\u0000\u0000\u01f6"+ + "\u01f7\u0001\u0000\u0000\u0000\u01f7O\u0001\u0000\u0000\u0000\u01f8\u01f6"+ + "\u0001\u0000\u0000\u0000\u01f9\u01fb\u0003\u00a0P\u0000\u01fa\u01fc\u0007"+ + "\u0002\u0000\u0000\u01fb\u01fa\u0001\u0000\u0000\u0000\u01fb\u01fc\u0001"+ + "\u0000\u0000\u0000\u01fc\u01ff\u0001\u0000\u0000\u0000\u01fd\u01fe\u0005"+ + "O\u0000\u0000\u01fe\u0200\u0007\u0003\u0000\u0000\u01ff\u01fd\u0001\u0000"+ + "\u0000\u0000\u01ff\u0200\u0001\u0000\u0000\u0000\u0200Q\u0001\u0000\u0000"+ + "\u0000\u0201\u0202\u0005%\u0000\u0000\u0202\u0203\u0003<\u001e\u0000\u0203"+ + "S\u0001\u0000\u0000\u0000\u0204\u0205\u0005$\u0000\u0000\u0205\u0206\u0003"+ + "<\u001e\u0000\u0206U\u0001\u0000\u0000\u0000\u0207\u0208\u0005(\u0000"+ + "\u0000\u0208\u020d\u0003X,\u0000\u0209\u020a\u0005D\u0000\u0000\u020a"+ + "\u020c\u0003X,\u0000\u020b\u0209\u0001\u0000\u0000\u0000\u020c\u020f\u0001"+ + "\u0000\u0000\u0000\u020d\u020b\u0001\u0000\u0000\u0000\u020d\u020e\u0001"+ + "\u0000\u0000\u0000\u020eW\u0001\u0000\u0000\u0000\u020f\u020d\u0001\u0000"+ + "\u0000\u0000\u0210\u0211\u00038\u001c\u0000\u0211\u0212\u0005\u009e\u0000"+ + "\u0000\u0212\u0213\u00038\u001c\u0000\u0213\u0219\u0001\u0000\u0000\u0000"+ + "\u0214\u0215\u00038\u001c\u0000\u0215\u0216\u0005?\u0000\u0000\u0216\u0217"+ + "\u00038\u001c\u0000\u0217\u0219\u0001\u0000\u0000\u0000\u0218\u0210\u0001"+ + "\u0000\u0000\u0000\u0218\u0214\u0001\u0000\u0000\u0000\u0219Y\u0001\u0000"+ + "\u0000\u0000\u021a\u021b\u0005\b\u0000\u0000\u021b\u021c\u0003\u00aaU"+ + "\u0000\u021c\u021e\u0003\u00c0`\u0000\u021d\u021f\u0003\\.\u0000\u021e"+ + "\u021d\u0001\u0000\u0000\u0000\u021e\u021f\u0001\u0000\u0000\u0000\u021f"+ + "[\u0001\u0000\u0000\u0000\u0220\u0225\u0003^/\u0000\u0221\u0222\u0005"+ + "D\u0000\u0000\u0222\u0224\u0003^/\u0000\u0223\u0221\u0001\u0000\u0000"+ + "\u0000\u0224\u0227\u0001\u0000\u0000\u0000\u0225\u0223\u0001\u0000\u0000"+ + "\u0000\u0225\u0226\u0001\u0000\u0000\u0000\u0226]\u0001\u0000\u0000\u0000"+ + "\u0227\u0225\u0001\u0000\u0000\u0000\u0228\u0229\u0003>\u001f\u0000\u0229"+ + "\u022a\u0005?\u0000\u0000\u022a\u022b\u0003\u00b6[\u0000\u022b_\u0001"+ + "\u0000\u0000\u0000\u022c\u022d\u0005U\u0000\u0000\u022d\u022f\u0003\u00b0"+ + "X\u0000\u022e\u022c\u0001\u0000\u0000\u0000\u022e\u022f\u0001\u0000\u0000"+ + "\u0000\u022fa\u0001\u0000\u0000\u0000\u0230\u0231\u0005\n\u0000\u0000"+ + "\u0231\u0232\u0003\u00aaU\u0000\u0232\u0237\u0003\u00c0`\u0000\u0233\u0234"+ + "\u0005D\u0000\u0000\u0234\u0236\u0003\u00c0`\u0000\u0235\u0233\u0001\u0000"+ + "\u0000\u0000\u0236\u0239\u0001\u0000\u0000\u0000\u0237\u0235\u0001\u0000"+ + "\u0000\u0000\u0237\u0238\u0001\u0000\u0000\u0000\u0238c\u0001\u0000\u0000"+ + "\u0000\u0239\u0237\u0001\u0000\u0000\u0000\u023a\u023b\u0005#\u0000\u0000"+ + "\u023b\u023c\u00034\u001a\u0000\u023ce\u0001\u0000\u0000\u0000\u023d\u023e"+ + "\u0005\u0006\u0000\u0000\u023e\u023f\u0003h4\u0000\u023fg\u0001\u0000"+ + "\u0000\u0000\u0240\u0241\u0005i\u0000\u0000\u0241\u0242\u0003\u0004\u0002"+ + "\u0000\u0242\u0243\u0005j\u0000\u0000\u0243i\u0001\u0000\u0000\u0000\u0244"+ + "\u0245\u0005*\u0000\u0000\u0245\u0246\u0005\u00a5\u0000\u0000\u0246k\u0001"+ + "\u0000\u0000\u0000\u0247\u0248\u0005\u0005\u0000\u0000\u0248\u024b\u0003"+ + "n7\u0000\u0249\u024a\u0005P\u0000\u0000\u024a\u024c\u00038\u001c\u0000"+ + "\u024b\u0249\u0001\u0000\u0000\u0000\u024b\u024c\u0001\u0000\u0000\u0000"+ + "\u024c\u0256\u0001\u0000\u0000\u0000\u024d\u024e\u0005U\u0000\u0000\u024e"+ + "\u0253\u0003p8\u0000\u024f\u0250\u0005D\u0000\u0000\u0250\u0252\u0003"+ + "p8\u0000\u0251\u024f\u0001\u0000\u0000\u0000\u0252\u0255\u0001\u0000\u0000"+ + "\u0000\u0253\u0251\u0001\u0000\u0000\u0000\u0253\u0254\u0001\u0000\u0000"+ + "\u0000\u0254\u0257\u0001\u0000\u0000\u0000\u0255\u0253\u0001\u0000\u0000"+ + "\u0000\u0256\u024d\u0001\u0000\u0000\u0000\u0256\u0257\u0001\u0000\u0000"+ + "\u0000\u0257m\u0001\u0000\u0000\u0000\u0258\u0259\u0007\u0004\u0000\u0000"+ + "\u0259o\u0001\u0000\u0000\u0000\u025a\u025b\u00038\u001c\u0000\u025b\u025c"+ + "\u0005?\u0000\u0000\u025c\u025e\u0001\u0000\u0000\u0000\u025d\u025a\u0001"+ + "\u0000\u0000\u0000\u025d\u025e\u0001\u0000\u0000\u0000\u025e\u025f\u0001"+ + "\u0000\u0000\u0000\u025f\u0260\u00038\u001c\u0000\u0260q\u0001\u0000\u0000"+ + "\u0000\u0261\u0262\u0005\u000e\u0000\u0000\u0262\u0263\u0003\u00b6[\u0000"+ + "\u0263s\u0001\u0000\u0000\u0000\u0264\u0265\u0005\u0004\u0000\u0000\u0265"+ + "\u0268\u00034\u001a\u0000\u0266\u0267\u0005P\u0000\u0000\u0267\u0269\u0003"+ + "4\u001a\u0000\u0268\u0266\u0001\u0000\u0000\u0000\u0268\u0269\u0001\u0000"+ + "\u0000\u0000\u0269\u026f\u0001\u0000\u0000\u0000\u026a\u026b\u0005\u009e"+ + "\u0000\u0000\u026b\u026c\u00034\u001a\u0000\u026c\u026d\u0005D\u0000\u0000"+ + "\u026d\u026e\u00034\u001a\u0000\u026e\u0270\u0001\u0000\u0000\u0000\u026f"+ + "\u026a\u0001\u0000\u0000\u0000\u026f\u0270\u0001\u0000\u0000\u0000\u0270"+ + "u\u0001\u0000\u0000\u0000\u0271\u0272\u0005\u0019\u0000\u0000\u0272\u0273"+ + "\u0003x<\u0000\u0273w\u0001\u0000\u0000\u0000\u0274\u0276\u0003z=\u0000"+ + "\u0275\u0274\u0001\u0000\u0000\u0000\u0276\u0277\u0001\u0000\u0000\u0000"+ + "\u0277\u0275\u0001\u0000\u0000\u0000\u0277\u0278\u0001\u0000\u0000\u0000"+ + "\u0278y\u0001\u0000\u0000\u0000\u0279\u027a\u0005i\u0000\u0000\u027a\u027b"+ + "\u0003|>\u0000\u027b\u027c\u0005j\u0000\u0000\u027c{\u0001\u0000\u0000"+ + "\u0000\u027d\u027e\u0006>\uffff\uffff\u0000\u027e\u027f\u0003~?\u0000"+ + "\u027f\u0285\u0001\u0000\u0000\u0000\u0280\u0281\n\u0001\u0000\u0000\u0281"+ + "\u0282\u00059\u0000\u0000\u0282\u0284\u0003~?\u0000\u0283\u0280\u0001"+ + "\u0000\u0000\u0000\u0284\u0287\u0001\u0000\u0000\u0000\u0285\u0283\u0001"+ + "\u0000\u0000\u0000\u0285\u0286\u0001\u0000\u0000\u0000\u0286}\u0001\u0000"+ + "\u0000\u0000\u0287\u0285\u0001\u0000\u0000\u0000\u0288\u0289\u0003\b\u0004"+ + "\u0000\u0289\u007f\u0001\u0000\u0000\u0000\u028a\u028e\u0005\f\u0000\u0000"+ + "\u028b\u028c\u00034\u001a\u0000\u028c\u028d\u0005?\u0000\u0000\u028d\u028f"+ + "\u0001\u0000\u0000\u0000\u028e\u028b\u0001\u0000\u0000\u0000\u028e\u028f"+ + "\u0001\u0000\u0000\u0000\u028f\u0290\u0001\u0000\u0000\u0000\u0290\u0291"+ + "\u0003\u00b6[\u0000\u0291\u0292\u0005P\u0000\u0000\u0292\u0293\u0003\u0010"+ + "\b\u0000\u0293\u0294\u0003`0\u0000\u0294\u0081\u0001\u0000\u0000\u0000"+ + "\u0295\u0299\u0005\u0007\u0000\u0000\u0296\u0297\u00034\u001a\u0000\u0297"+ + "\u0298\u0005?\u0000\u0000\u0298\u029a\u0001\u0000\u0000\u0000\u0299\u0296"+ + "\u0001\u0000\u0000\u0000\u0299\u029a\u0001\u0000\u0000\u0000\u029a\u029b"+ + "\u0001\u0000\u0000\u0000\u029b\u029c\u0003\u00aaU\u0000\u029c\u029d\u0003"+ + "`0\u0000\u029d\u0083\u0001\u0000\u0000\u0000\u029e\u029f\u0005\u001b\u0000"+ + "\u0000\u029f\u02a0\u0005~\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\u02ac"+ + "\u0001\u0000\u0000\u0000\u02a5\u02a6\u0005\u001c\u0000\u0000\u02a6\u02a9"+ + "\u00030\u0018\u0000\u02a7\u02a8\u0005@\u0000\u0000\u02a8\u02aa\u0003\u0010"+ + "\b\u0000\u02a9\u02a7\u0001\u0000\u0000\u0000\u02a9\u02aa\u0001\u0000\u0000"+ + "\u0000\u02aa\u02ac\u0001\u0000\u0000\u0000\u02ab\u029e\u0001\u0000\u0000"+ + "\u0000\u02ab\u02a5\u0001\u0000\u0000\u0000\u02ac\u0085\u0001\u0000\u0000"+ + "\u0000\u02ad\u02af\u0005\u001a\u0000\u0000\u02ae\u02b0\u0003>\u001f\u0000"+ + "\u02af\u02ae\u0001\u0000\u0000\u0000\u02af\u02b0\u0001\u0000\u0000\u0000"+ + "\u02b0\u02b4\u0001\u0000\u0000\u0000\u02b1\u02b3\u0003\u0088D\u0000\u02b2"+ + "\u02b1\u0001\u0000\u0000\u0000\u02b3\u02b6\u0001\u0000\u0000\u0000\u02b4"+ + "\u02b2\u0001\u0000\u0000\u0000\u02b4\u02b5\u0001\u0000\u0000\u0000\u02b5"+ + "\u0087\u0001\u0000\u0000\u0000\u02b6\u02b4\u0001\u0000\u0000\u0000\u02b7"+ + "\u02b8\u0005y\u0000\u0000\u02b8\u02b9\u0005@\u0000\u0000\u02b9\u02c3\u0003"+ + "4\u001a\u0000\u02ba\u02bb\u0005z\u0000\u0000\u02bb\u02bc\u0005@\u0000"+ + "\u0000\u02bc\u02c3\u0003\u008aE\u0000\u02bd\u02be\u0005x\u0000\u0000\u02be"+ + "\u02bf\u0005@\u0000\u0000\u02bf\u02c3\u00034\u001a\u0000\u02c0\u02c1\u0005"+ + "U\u0000\u0000\u02c1\u02c3\u0003\u00b0X\u0000\u02c2\u02b7\u0001\u0000\u0000"+ + "\u0000\u02c2\u02ba\u0001\u0000\u0000\u0000\u02c2\u02bd\u0001\u0000\u0000"+ + "\u0000\u02c2\u02c0\u0001\u0000\u0000\u0000\u02c3\u0089\u0001\u0000\u0000"+ + "\u0000\u02c4\u02c9\u00034\u001a\u0000\u02c5\u02c6\u0005D\u0000\u0000\u02c6"+ + "\u02c8\u00034\u001a\u0000\u02c7\u02c5\u0001\u0000\u0000\u0000\u02c8\u02cb"+ + "\u0001\u0000\u0000\u0000\u02c9\u02c7\u0001\u0000\u0000\u0000\u02c9\u02ca"+ + "\u0001\u0000\u0000\u0000\u02ca\u008b\u0001\u0000\u0000\u0000\u02cb\u02c9"+ + "\u0001\u0000\u0000\u0000\u02cc\u02cd\u0005\u0013\u0000\u0000\u02cd\u008d"+ + "\u0001\u0000\u0000\u0000\u02ce\u02cf\u0005\u0015\u0000\u0000\u02cf\u008f"+ + "\u0001\u0000\u0000\u0000\u02d0\u02d1\u0005!\u0000\u0000\u02d1\u02d2\u0003"+ + " \u0010\u0000\u02d2\u02d3\u0005P\u0000\u0000\u02d3\u02d4\u0003<\u001e"+ + "\u0000\u02d4\u0091\u0001\u0000\u0000\u0000\u02d5\u02d6\u0005&\u0000\u0000"+ + "\u02d6\u02d7\u0003<\u001e\u0000\u02d7\u0093\u0001\u0000\u0000\u0000\u02d8"+ + "\u02d9\u0005\u0012\u0000\u0000\u02d9\u02da\u00034\u001a\u0000\u02da\u02db"+ + "\u0005?\u0000\u0000\u02db\u02dc\u0003\u00aaU\u0000\u02dc\u0095\u0001\u0000"+ + "\u0000\u0000\u02dd\u02de\u0005\u0014\u0000\u0000\u02de\u02df\u00034\u001a"+ + "\u0000\u02df\u02e0\u0005?\u0000\u0000\u02e0\u02e1\u0003\u00aaU\u0000\u02e1"+ + "\u0097\u0001\u0000\u0000\u0000\u02e2\u02e3\u0005)\u0000\u0000\u02e3\u02e4"+ + "\u0003\u009aM\u0000\u02e4\u02e5\u0005C\u0000\u0000\u02e5\u0099\u0001\u0000"+ + "\u0000\u0000\u02e6\u02e7\u0003>\u001f\u0000\u02e7\u02ea\u0005?\u0000\u0000"+ + "\u02e8\u02eb\u0003\u00b6[\u0000\u02e9\u02eb\u0003\u00b0X\u0000\u02ea\u02e8"+ + "\u0001\u0000\u0000\u0000\u02ea\u02e9\u0001\u0000\u0000\u0000\u02eb\u009b"+ + "\u0001\u0000\u0000\u0000\u02ec\u02ee\u0005\"\u0000\u0000\u02ed\u02ef\u0003"+ + "\u009eO\u0000\u02ee\u02ed\u0001\u0000\u0000\u0000\u02ee\u02ef\u0001\u0000"+ + "\u0000\u0000\u02ef\u02f0\u0001\u0000\u0000\u0000\u02f0\u02f1\u0005P\u0000"+ + "\u0000\u02f1\u02f2\u00034\u001a\u0000\u02f2\u02f3\u0005\u008d\u0000\u0000"+ + "\u02f3\u02f4\u0003\u00be_\u0000\u02f4\u02f5\u0003`0\u0000\u02f5\u009d"+ + "\u0001\u0000\u0000\u0000\u02f6\u02f9\u0003B!\u0000\u02f7\u02f9\u0003\u00aa"+ + "U\u0000\u02f8\u02f6\u0001\u0000\u0000\u0000\u02f8\u02f7\u0001\u0000\u0000"+ + "\u0000\u02f9\u009f\u0001\u0000\u0000\u0000\u02fa\u02fb\u0006P\uffff\uffff"+ + "\u0000\u02fb\u02fc\u0005M\u0000\u0000\u02fc\u0318\u0003\u00a0P\b\u02fd"+ + "\u0318\u0003\u00a6S\u0000\u02fe\u0318\u0003\u00a2Q\u0000\u02ff\u0301\u0003"+ + "\u00a6S\u0000\u0300\u0302\u0005M\u0000\u0000\u0301\u0300\u0001\u0000\u0000"+ + "\u0000\u0301\u0302\u0001\u0000\u0000\u0000\u0302\u0303\u0001\u0000\u0000"+ + "\u0000\u0303\u0304\u0005I\u0000\u0000\u0304\u0305\u0005i\u0000\u0000\u0305"+ + "\u030a\u0003\u00a6S\u0000\u0306\u0307\u0005D\u0000\u0000\u0307\u0309\u0003"+ + "\u00a6S\u0000\u0308\u0306\u0001\u0000\u0000\u0000\u0309\u030c\u0001\u0000"+ + "\u0000\u0000\u030a\u0308\u0001\u0000\u0000\u0000\u030a\u030b\u0001\u0000"+ + "\u0000\u0000\u030b\u030d\u0001\u0000\u0000\u0000\u030c\u030a\u0001\u0000"+ + "\u0000\u0000\u030d\u030e\u0005j\u0000\u0000\u030e\u0318\u0001\u0000\u0000"+ + "\u0000\u030f\u0310\u0003\u00a6S\u0000\u0310\u0312\u0005J\u0000\u0000\u0311"+ + "\u0313\u0005M\u0000\u0000\u0312\u0311\u0001\u0000\u0000\u0000\u0312\u0313"+ + "\u0001\u0000\u0000\u0000\u0313\u0314\u0001\u0000\u0000\u0000\u0314\u0315"+ + "\u0005N\u0000\u0000\u0315\u0318\u0001\u0000\u0000\u0000\u0316\u0318\u0003"+ + "\u00a4R\u0000\u0317\u02fa\u0001\u0000\u0000\u0000\u0317\u02fd\u0001\u0000"+ + "\u0000\u0000\u0317\u02fe\u0001\u0000\u0000\u0000\u0317\u02ff\u0001\u0000"+ + "\u0000\u0000\u0317\u030f\u0001\u0000\u0000\u0000\u0317\u0316\u0001\u0000"+ + "\u0000\u0000\u0318\u0321\u0001\u0000\u0000\u0000\u0319\u031a\n\u0005\u0000"+ + "\u0000\u031a\u031b\u0005=\u0000\u0000\u031b\u0320\u0003\u00a0P\u0006\u031c"+ + "\u031d\n\u0004\u0000\u0000\u031d\u031e\u0005Q\u0000\u0000\u031e\u0320"+ + "\u0003\u00a0P\u0005\u031f\u0319\u0001\u0000\u0000\u0000\u031f\u031c\u0001"+ + "\u0000\u0000\u0000\u0320\u0323\u0001\u0000\u0000\u0000\u0321\u031f\u0001"+ + "\u0000\u0000\u0000\u0321\u0322\u0001\u0000\u0000\u0000\u0322\u00a1\u0001"+ + "\u0000\u0000\u0000\u0323\u0321\u0001\u0000\u0000\u0000\u0324\u0326\u0003"+ + "\u00a6S\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\u0003H$\u0000\u032a"+ + "\u0353\u0001\u0000\u0000\u0000\u032b\u032d\u0003\u00a6S\u0000\u032c\u032e"+ + "\u0005M\u0000\u0000\u032d\u032c\u0001\u0000\u0000\u0000\u032d\u032e\u0001"+ + "\u0000\u0000\u0000\u032e\u032f\u0001\u0000\u0000\u0000\u032f\u0330\u0005"+ + "S\u0000\u0000\u0330\u0331\u0003H$\u0000\u0331\u0353\u0001\u0000\u0000"+ + "\u0000\u0332\u0334\u0003\u00a6S\u0000\u0333\u0335\u0005M\u0000\u0000\u0334"+ + "\u0333\u0001\u0000\u0000\u0000\u0334\u0335\u0001\u0000\u0000\u0000\u0335"+ + "\u0336\u0001\u0000\u0000\u0000\u0336\u0337\u0005L\u0000\u0000\u0337\u0338"+ + "\u0005i\u0000\u0000\u0338\u033d\u0003H$\u0000\u0339\u033a\u0005D\u0000"+ + "\u0000\u033a\u033c\u0003H$\u0000\u033b\u0339\u0001\u0000\u0000\u0000\u033c"+ + "\u033f\u0001\u0000\u0000\u0000\u033d\u033b\u0001\u0000\u0000\u0000\u033d"+ + "\u033e\u0001\u0000\u0000\u0000\u033e\u0340\u0001\u0000\u0000\u0000\u033f"+ + "\u033d\u0001\u0000\u0000\u0000\u0340\u0341\u0005j\u0000\u0000\u0341\u0353"+ + "\u0001\u0000\u0000\u0000\u0342\u0344\u0003\u00a6S\u0000\u0343\u0345\u0005"+ + "M\u0000\u0000\u0344\u0343\u0001\u0000\u0000\u0000\u0344\u0345\u0001\u0000"+ + "\u0000\u0000\u0345\u0346\u0001\u0000\u0000\u0000\u0346\u0347\u0005S\u0000"+ + "\u0000\u0347\u0348\u0005i\u0000\u0000\u0348\u034d\u0003H$\u0000\u0349"+ + "\u034a\u0005D\u0000\u0000\u034a\u034c\u0003H$\u0000\u034b\u0349\u0001"+ + "\u0000\u0000\u0000\u034c\u034f\u0001\u0000\u0000\u0000\u034d\u034b\u0001"+ + "\u0000\u0000\u0000\u034d\u034e\u0001\u0000\u0000\u0000\u034e\u0350\u0001"+ + "\u0000\u0000\u0000\u034f\u034d\u0001\u0000\u0000\u0000\u0350\u0351\u0005"+ + "j\u0000\u0000\u0351\u0353\u0001\u0000\u0000\u0000\u0352\u0324\u0001\u0000"+ + "\u0000\u0000\u0352\u032b\u0001\u0000\u0000\u0000\u0352\u0332\u0001\u0000"+ + "\u0000\u0000\u0352\u0342\u0001\u0000\u0000\u0000\u0353\u00a3\u0001\u0000"+ + "\u0000\u0000\u0354\u0357\u00034\u001a\u0000\u0355\u0356\u0005A\u0000\u0000"+ + "\u0356\u0358\u0003\f\u0006\u0000\u0357\u0355\u0001\u0000\u0000\u0000\u0357"+ + "\u0358\u0001\u0000\u0000\u0000\u0358\u0359\u0001\u0000\u0000\u0000\u0359"+ + "\u035a\u0005B\u0000\u0000\u035a\u035b\u0003\u00b6[\u0000\u035b\u00a5\u0001"+ + "\u0000\u0000\u0000\u035c\u0362\u0003\u00a8T\u0000\u035d\u035e\u0003\u00a8"+ + "T\u0000\u035e\u035f\u0003\u00c2a\u0000\u035f\u0360\u0003\u00a8T\u0000"+ + "\u0360\u0362\u0001\u0000\u0000\u0000\u0361\u035c\u0001\u0000\u0000\u0000"+ + "\u0361\u035d\u0001\u0000\u0000\u0000\u0362\u00a7\u0001\u0000\u0000\u0000"+ + "\u0363\u0364\u0006T\uffff\uffff\u0000\u0364\u0368\u0003\u00aaU\u0000\u0365"+ + "\u0366\u0007\u0005\u0000\u0000\u0366\u0368\u0003\u00a8T\u0003\u0367\u0363"+ + "\u0001\u0000\u0000\u0000\u0367\u0365\u0001\u0000\u0000\u0000\u0368\u0371"+ + "\u0001\u0000\u0000\u0000\u0369\u036a\n\u0002\u0000\u0000\u036a\u036b\u0007"+ + "\u0006\u0000\u0000\u036b\u0370\u0003\u00a8T\u0003\u036c\u036d\n\u0001"+ + "\u0000\u0000\u036d\u036e\u0007\u0005\u0000\u0000\u036e\u0370\u0003\u00a8"+ + "T\u0002\u036f\u0369\u0001\u0000\u0000\u0000\u036f\u036c\u0001\u0000\u0000"+ + "\u0000\u0370\u0373\u0001\u0000\u0000\u0000\u0371\u036f\u0001\u0000\u0000"+ + "\u0000\u0371\u0372\u0001\u0000\u0000\u0000\u0372\u00a9\u0001\u0000\u0000"+ + "\u0000\u0373\u0371\u0001\u0000\u0000\u0000\u0374\u0375\u0006U\uffff\uffff"+ + "\u0000\u0375\u037d\u0003\u00b6[\u0000\u0376\u037d\u00034\u001a\u0000\u0377"+ + "\u037d\u0003\u00acV\u0000\u0378\u0379\u0005i\u0000\u0000\u0379\u037a\u0003"+ + "\u00a0P\u0000\u037a\u037b\u0005j\u0000\u0000\u037b\u037d\u0001\u0000\u0000"+ + "\u0000\u037c\u0374\u0001\u0000\u0000\u0000\u037c\u0376\u0001\u0000\u0000"+ + "\u0000\u037c\u0377\u0001\u0000\u0000\u0000\u037c\u0378\u0001\u0000\u0000"+ + "\u0000\u037d\u0383\u0001\u0000\u0000\u0000\u037e\u037f\n\u0001\u0000\u0000"+ + "\u037f\u0380\u0005A\u0000\u0000\u0380\u0382\u0003\f\u0006\u0000\u0381"+ + "\u037e\u0001\u0000\u0000\u0000\u0382\u0385\u0001\u0000\u0000\u0000\u0383"+ + "\u0381\u0001\u0000\u0000\u0000\u0383\u0384\u0001\u0000\u0000\u0000\u0384"+ + "\u00ab\u0001\u0000\u0000\u0000\u0385\u0383\u0001\u0000\u0000\u0000\u0386"+ + "\u0387\u0003\u00aeW\u0000\u0387\u0395\u0005i\u0000\u0000\u0388\u0396\u0005"+ + "_\u0000\u0000\u0389\u038e\u0003\u00a0P\u0000\u038a\u038b\u0005D\u0000"+ + "\u0000\u038b\u038d\u0003\u00a0P\u0000\u038c\u038a\u0001\u0000\u0000\u0000"+ + "\u038d\u0390\u0001\u0000\u0000\u0000\u038e\u038c\u0001\u0000\u0000\u0000"+ + "\u038e\u038f\u0001\u0000\u0000\u0000\u038f\u0393\u0001\u0000\u0000\u0000"+ + "\u0390\u038e\u0001\u0000\u0000\u0000\u0391\u0392\u0005D\u0000\u0000\u0392"+ + "\u0394\u0003\u00b0X\u0000\u0393\u0391\u0001\u0000\u0000\u0000\u0393\u0394"+ + "\u0001\u0000\u0000\u0000\u0394\u0396\u0001\u0000\u0000\u0000\u0395\u0388"+ + "\u0001\u0000\u0000\u0000\u0395\u0389\u0001\u0000\u0000\u0000\u0395\u0396"+ + "\u0001\u0000\u0000\u0000\u0396\u0397\u0001\u0000\u0000\u0000\u0397\u0398"+ + "\u0005j\u0000\u0000\u0398\u00ad\u0001\u0000\u0000\u0000\u0399\u039d\u0003"+ + "F#\u0000\u039a\u039d\u0005H\u0000\u0000\u039b\u039d\u0005K\u0000\u0000"+ + "\u039c\u0399\u0001\u0000\u0000\u0000\u039c\u039a\u0001\u0000\u0000\u0000"+ + "\u039c\u039b\u0001\u0000\u0000\u0000\u039d\u00af\u0001\u0000\u0000\u0000"+ + "\u039e\u03a7\u0005b\u0000\u0000\u039f\u03a4\u0003\u00b2Y\u0000\u03a0\u03a1"+ + "\u0005D\u0000\u0000\u03a1\u03a3\u0003\u00b2Y\u0000\u03a2\u03a0\u0001\u0000"+ + "\u0000\u0000\u03a3\u03a6\u0001\u0000\u0000\u0000\u03a4\u03a2\u0001\u0000"+ + "\u0000\u0000\u03a4\u03a5\u0001\u0000\u0000\u0000\u03a5\u03a8\u0001\u0000"+ + "\u0000\u0000\u03a6\u03a4\u0001\u0000\u0000\u0000\u03a7\u039f\u0001\u0000"+ + "\u0000\u0000\u03a7\u03a8\u0001\u0000\u0000\u0000\u03a8\u03a9\u0001\u0000"+ + "\u0000\u0000\u03a9\u03aa\u0005c\u0000\u0000\u03aa\u00b1\u0001\u0000\u0000"+ + "\u0000\u03ab\u03ac\u0003\u00c0`\u0000\u03ac\u03ad\u0005B\u0000\u0000\u03ad"+ + "\u03ae\u0003\u00b4Z\u0000\u03ae\u00b3\u0001\u0000\u0000\u0000\u03af\u03b2"+ + "\u0003\u00b6[\u0000\u03b0\u03b2\u0003\u00b0X\u0000\u03b1\u03af\u0001\u0000"+ + "\u0000\u0000\u03b1\u03b0\u0001\u0000\u0000\u0000\u03b2\u00b5\u0001\u0000"+ + "\u0000\u0000\u03b3\u03de\u0005N\u0000\u0000\u03b4\u03b5\u0003\u00be_\u0000"+ + "\u03b5\u03b6\u0005k\u0000\u0000\u03b6\u03de\u0001\u0000\u0000\u0000\u03b7"+ + "\u03de\u0003\u00bc^\u0000\u03b8\u03de\u0003\u00be_\u0000\u03b9\u03de\u0003"+ + "\u00b8\\\u0000\u03ba\u03de\u0003B!\u0000\u03bb\u03de\u0003\u00c0`\u0000"+ + "\u03bc\u03bd\u0005g\u0000\u0000\u03bd\u03c2\u0003\u00ba]\u0000\u03be\u03bf"+ + "\u0005D\u0000\u0000\u03bf\u03c1\u0003\u00ba]\u0000\u03c0\u03be\u0001\u0000"+ + "\u0000\u0000\u03c1\u03c4\u0001\u0000\u0000\u0000\u03c2\u03c0\u0001\u0000"+ + "\u0000\u0000\u03c2\u03c3\u0001\u0000\u0000\u0000\u03c3\u03c5\u0001\u0000"+ + "\u0000\u0000\u03c4\u03c2\u0001\u0000\u0000\u0000\u03c5\u03c6\u0005h\u0000"+ + "\u0000\u03c6\u03de\u0001\u0000\u0000\u0000\u03c7\u03c8\u0005g\u0000\u0000"+ + "\u03c8\u03cd\u0003\u00b8\\\u0000\u03c9\u03ca\u0005D\u0000\u0000\u03ca"+ + "\u03cc\u0003\u00b8\\\u0000\u03cb\u03c9\u0001\u0000\u0000\u0000\u03cc\u03cf"+ + "\u0001\u0000\u0000\u0000\u03cd\u03cb\u0001\u0000\u0000\u0000\u03cd\u03ce"+ + "\u0001\u0000\u0000\u0000\u03ce\u03d0\u0001\u0000\u0000\u0000\u03cf\u03cd"+ + "\u0001\u0000\u0000\u0000\u03d0\u03d1\u0005h\u0000\u0000\u03d1\u03de\u0001"+ + "\u0000\u0000\u0000\u03d2\u03d3\u0005g\u0000\u0000\u03d3\u03d8\u0003\u00c0"+ + "`\u0000\u03d4\u03d5\u0005D\u0000\u0000\u03d5\u03d7\u0003\u00c0`\u0000"+ + "\u03d6\u03d4\u0001\u0000\u0000\u0000\u03d7\u03da\u0001\u0000\u0000\u0000"+ + "\u03d8\u03d6\u0001\u0000\u0000\u0000\u03d8\u03d9\u0001\u0000\u0000\u0000"+ + "\u03d9\u03db\u0001\u0000\u0000\u0000\u03da\u03d8\u0001\u0000\u0000\u0000"+ + "\u03db\u03dc\u0005h\u0000\u0000\u03dc\u03de\u0001\u0000\u0000\u0000\u03dd"+ + "\u03b3\u0001\u0000\u0000\u0000\u03dd\u03b4\u0001\u0000\u0000\u0000\u03dd"+ + "\u03b7\u0001\u0000\u0000\u0000\u03dd\u03b8\u0001\u0000\u0000\u0000\u03dd"+ + "\u03b9\u0001\u0000\u0000\u0000\u03dd\u03ba\u0001\u0000\u0000\u0000\u03dd"+ + "\u03bb\u0001\u0000\u0000\u0000\u03dd\u03bc\u0001\u0000\u0000\u0000\u03dd"+ + "\u03c7\u0001\u0000\u0000\u0000\u03dd\u03d2\u0001\u0000\u0000\u0000\u03de"+ + "\u00b7\u0001\u0000\u0000\u0000\u03df\u03e0\u0007\u0007\u0000\u0000\u03e0"+ + "\u00b9\u0001\u0000\u0000\u0000\u03e1\u03e4\u0003\u00bc^\u0000\u03e2\u03e4"+ + "\u0003\u00be_\u0000\u03e3\u03e1\u0001\u0000\u0000\u0000\u03e3\u03e2\u0001"+ + "\u0000\u0000\u0000\u03e4\u00bb\u0001\u0000\u0000\u0000\u03e5\u03e7\u0007"+ + "\u0005\u0000\u0000\u03e6\u03e5\u0001\u0000\u0000\u0000\u03e6\u03e7\u0001"+ + "\u0000\u0000\u0000\u03e7\u03e8\u0001\u0000\u0000\u0000\u03e8\u03e9\u0005"+ + "<\u0000\u0000\u03e9\u00bd\u0001\u0000\u0000\u0000\u03ea\u03ec\u0007\u0005"+ + "\u0000\u0000\u03eb\u03ea\u0001\u0000\u0000\u0000\u03eb\u03ec\u0001\u0000"+ + "\u0000\u0000\u03ec\u03ed\u0001\u0000\u0000\u0000\u03ed\u03ee\u0005;\u0000"+ + "\u0000\u03ee\u00bf\u0001\u0000\u0000\u0000\u03ef\u03f0\u0005:\u0000\u0000"+ + "\u03f0\u00c1\u0001\u0000\u0000\u0000\u03f1\u03f2\u0007\b\u0000\u0000\u03f2"+ + "\u00c3\u0001\u0000\u0000\u0000\u03f3\u03f4\u0007\t\u0000\u0000\u03f4\u03f5"+ + "\u0005\u0082\u0000\u0000\u03f5\u03f6\u0003\u00c6c\u0000\u03f6\u03f7\u0003"+ + "\u00c8d\u0000\u03f7\u00c5\u0001\u0000\u0000\u0000\u03f8\u03f9\u0004c\u000f"+ + "\u0000\u03f9\u03fb\u0003 \u0010\u0000\u03fa\u03fc\u0005\u009e\u0000\u0000"+ + "\u03fb\u03fa\u0001\u0000\u0000\u0000\u03fb\u03fc\u0001\u0000\u0000\u0000"+ + "\u03fc\u03fd\u0001\u0000\u0000\u0000\u03fd\u03fe\u0005q\u0000\u0000\u03fe"+ + "\u0401\u0001\u0000\u0000\u0000\u03ff\u0401\u0003 \u0010\u0000\u0400\u03f8"+ + "\u0001\u0000\u0000\u0000\u0400\u03ff\u0001\u0000\u0000\u0000\u0401\u00c7"+ + "\u0001\u0000\u0000\u0000\u0402\u0403\u0005P\u0000\u0000\u0403\u0408\u0003"+ + "\u00a0P\u0000\u0404\u0405\u0005D\u0000\u0000\u0405\u0407\u0003\u00a0P"+ + "\u0000\u0406\u0404\u0001\u0000\u0000\u0000\u0407\u040a\u0001\u0000\u0000"+ + "\u0000\u0408\u0406\u0001\u0000\u0000\u0000\u0408\u0409\u0001\u0000\u0000"+ + "\u0000\u0409\u00c9\u0001\u0000\u0000\u0000\u040a\u0408\u0001\u0000\u0000"+ + "\u0000\u040b\u040f\u0005\'\u0000\u0000\u040c\u040e\u0003\u00ceg\u0000"+ + "\u040d\u040c\u0001\u0000\u0000\u0000\u040e\u0411\u0001\u0000\u0000\u0000"+ + "\u040f\u040d\u0001\u0000\u0000\u0000\u040f\u0410\u0001\u0000\u0000\u0000"+ + "\u0410\u0415\u0001\u0000\u0000\u0000\u0411\u040f\u0001\u0000\u0000\u0000"+ + "\u0412\u0413\u0003\u00ccf\u0000\u0413\u0414\u0005?\u0000\u0000\u0414\u0416"+ + "\u0001\u0000\u0000\u0000\u0415\u0412\u0001\u0000\u0000\u0000\u0415\u0416"+ + "\u0001\u0000\u0000\u0000\u0416\u0417\u0001\u0000\u0000\u0000\u0417\u0419"+ + "\u0005i\u0000\u0000\u0418\u041a\u0003\u00d6k\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\u041d\u0001\u0000"+ + "\u0000\u0000\u041d\u041e\u0005j\u0000\u0000\u041e\u042c\u0001\u0000\u0000"+ + "\u0000\u041f\u0423\u0005\'\u0000\u0000\u0420\u0422\u0003\u00ceg\u0000"+ + "\u0421\u0420\u0001\u0000\u0000\u0000\u0422\u0425\u0001\u0000\u0000\u0000"+ + "\u0423\u0421\u0001\u0000\u0000\u0000\u0423\u0424\u0001\u0000\u0000\u0000"+ + "\u0424\u0427\u0001\u0000\u0000\u0000\u0425\u0423\u0001\u0000\u0000\u0000"+ + "\u0426\u0428\u0003\u00d6k\u0000\u0427\u0426\u0001\u0000\u0000\u0000\u0428"+ + "\u0429\u0001\u0000\u0000\u0000\u0429\u0427\u0001\u0000\u0000\u0000\u0429"+ + "\u042a\u0001\u0000\u0000\u0000\u042a\u042c\u0001\u0000\u0000\u0000\u042b"+ + "\u040b\u0001\u0000\u0000\u0000\u042b\u041f\u0001\u0000\u0000\u0000\u042c"+ + "\u00cb\u0001\u0000\u0000\u0000\u042d\u042e\u0007\u0001\u0000\u0000\u042e"+ + "\u00cd\u0001\u0000\u0000\u0000\u042f\u0430\u0003\u00d0h\u0000\u0430\u0431"+ + "\u0005?\u0000\u0000\u0431\u0432\u0003\u00d2i\u0000\u0432\u00cf\u0001\u0000"+ + "\u0000\u0000\u0433\u0434\u0007\n\u0000\u0000\u0434\u00d1\u0001\u0000\u0000"+ + "\u0000\u0435\u043a\u0003\u00d8l\u0000\u0436\u0437\u0005D\u0000\u0000\u0437"+ + "\u0439\u0003\u00d8l\u0000\u0438\u0436\u0001\u0000\u0000\u0000\u0439\u043c"+ + "\u0001\u0000\u0000\u0000\u043a\u0438\u0001\u0000\u0000\u0000\u043a\u043b"+ + "\u0001\u0000\u0000\u0000\u043b\u0440\u0001\u0000\u0000\u0000\u043c\u043a"+ + "\u0001\u0000\u0000\u0000\u043d\u0440\u0005l\u0000\u0000\u043e\u0440\u0005"+ + "e\u0000\u0000\u043f\u0435\u0001\u0000\u0000\u0000\u043f\u043d\u0001\u0000"+ + "\u0000\u0000\u043f\u043e\u0001\u0000\u0000\u0000\u0440\u00d3\u0001\u0000"+ + "\u0000\u0000\u0441\u0442\u0007\u000b\u0000\u0000\u0442\u00d5\u0001\u0000"+ + "\u0000\u0000\u0443\u0445\u0003\u00d4j\u0000\u0444\u0443\u0001\u0000\u0000"+ + "\u0000\u0445\u0446\u0001\u0000\u0000\u0000\u0446\u0444\u0001\u0000\u0000"+ + "\u0000\u0446\u0447\u0001\u0000\u0000\u0000\u0447\u0451\u0001\u0000\u0000"+ + "\u0000\u0448\u044c\u0005i\u0000\u0000\u0449\u044b\u0003\u00d6k\u0000\u044a"+ + "\u0449\u0001\u0000\u0000\u0000\u044b\u044e\u0001\u0000\u0000\u0000\u044c"+ + "\u044a\u0001\u0000\u0000\u0000\u044c\u044d\u0001\u0000\u0000\u0000\u044d"+ + "\u044f\u0001\u0000\u0000\u0000\u044e\u044c\u0001\u0000\u0000\u0000\u044f"+ + "\u0451\u0005j\u0000\u0000\u0450\u0444\u0001\u0000\u0000\u0000\u0450\u0448"+ + "\u0001\u0000\u0000\u0000\u0451\u00d7\u0001\u0000\u0000\u0000\u0452\u0453"+ + "\u0003\u00dam\u0000\u0453\u0454\u0005B\u0000\u0000\u0454\u0455\u0003\u00de"+ + "o\u0000\u0455\u045c\u0001\u0000\u0000\u0000\u0456\u0457\u0003\u00deo\u0000"+ + "\u0457\u0458\u0005A\u0000\u0000\u0458\u0459\u0003\u00dcn\u0000\u0459\u045c"+ + "\u0001\u0000\u0000\u0000\u045a\u045c\u0003\u00e0p\u0000\u045b\u0452\u0001"+ + "\u0000\u0000\u0000\u045b\u0456\u0001\u0000\u0000\u0000\u045b\u045a\u0001"+ + "\u0000\u0000\u0000\u045c\u00d9\u0001\u0000\u0000\u0000\u045d\u045e\u0007"+ + "\f\u0000\u0000\u045e\u00db\u0001\u0000\u0000\u0000\u045f\u0460\u0007\f"+ + "\u0000\u0000\u0460\u00dd\u0001\u0000\u0000\u0000\u0461\u0462\u0007\f\u0000"+ + "\u0000\u0462\u00df\u0001\u0000\u0000\u0000\u0463\u0464\u0007\r\u0000\u0000"+ + "\u0464\u00e1\u0001\u0000\u0000\u0000n\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"; + "\u01e4\u01ed\u01f6\u01fb\u01ff\u020d\u0218\u021e\u0225\u022e\u0237\u024b"+ + "\u0253\u0256\u025d\u0268\u026f\u0277\u0285\u028e\u0299\u02a3\u02a9\u02ab"+ + "\u02af\u02b4\u02c2\u02c9\u02ea\u02ee\u02f8\u0301\u030a\u0312\u0317\u031f"+ + "\u0321\u0326\u032d\u0334\u033d\u0344\u034d\u0352\u0357\u0361\u0367\u036f"+ + "\u0371\u037c\u0383\u038e\u0393\u0395\u039c\u03a4\u03a7\u03b1\u03c2\u03cd"+ + "\u03d8\u03dd\u03e3\u03e6\u03eb\u03fb\u0400\u0408\u040f\u0415\u041b\u0423"+ + "\u0429\u042b\u043a\u043f\u0446\u044c\u0450\u045b"; 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/LogicalPlanBuilder.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java index 9e3bb8f0ee009..0ba7cad39e445 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 @@ -600,7 +600,11 @@ public PlanFactory visitLimitCommand(EsqlBaseParser.LimitCommandContext ctx) { var limitByGroupKey = ctx.limitByGroupKey(); if (limitByGroupKey != null) { - groupings = new ArrayList<>(visitGrouping(limitByGroupKey.grouping)); + var booleanExpressions = limitByGroupKey.booleanExpression(); + groupings = new ArrayList<>(booleanExpressions.size()); + for (var boolExpr : booleanExpressions) { + groupings.add(expression(boolExpr)); + } return input -> new LimitBy(source, new Literal(source, i, DataType.INTEGER), input, groupings); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/PlanWritables.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/PlanWritables.java index cd438afe2ac9e..1bdee8bb24a3a 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/PlanWritables.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/PlanWritables.java @@ -55,6 +55,7 @@ import org.elasticsearch.xpack.esql.plan.physical.FragmentExec; import org.elasticsearch.xpack.esql.plan.physical.GrokExec; import org.elasticsearch.xpack.esql.plan.physical.HashJoinExec; +import org.elasticsearch.xpack.esql.plan.physical.LimitByExec; import org.elasticsearch.xpack.esql.plan.physical.LimitExec; import org.elasticsearch.xpack.esql.plan.physical.LocalSourceExec; import org.elasticsearch.xpack.esql.plan.physical.MetricsInfoExec; @@ -138,6 +139,7 @@ public static List physical() { FragmentExec.ENTRY, GrokExec.ENTRY, HashJoinExec.ENTRY, + LimitByExec.ENTRY, LimitExec.ENTRY, LocalSourceExec.ENTRY, MvExpandExec.ENTRY, diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/LimitBy.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/LimitBy.java index c130ff4a3f0b9..4bb83ebd2f6ed 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/LimitBy.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/LimitBy.java @@ -24,27 +24,27 @@ * Retains at most N rows per group defined by one or more grouping key expressions. * This is the {@code LIMIT N BY expr1, expr2, ...} command. */ -public class LimitBy extends UnaryPlan implements TelemetryAware, PipelineBreaker, ExecutesOn { +public class LimitBy extends UnaryPlan implements TelemetryAware, PipelineBreaker { public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(LogicalPlan.class, "LimitBy", LimitBy::new); - private final Expression limit; + private final Expression limitPerGroup; 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. - * Needs to be set to {@code true} in {@link org.elasticsearch.xpack.esql.optimizer.rules.logical.PushDownAndCombineLimits} to avoid + * Needs to be set to {@code true} in {@link org.elasticsearch.xpack.esql.optimizer.rules.logical.PushDownAndCombineLimitBy} to avoid * infinite loops from adding a duplicate of the limit past the child over and over again. */ private final transient boolean duplicated; - public LimitBy(Source source, Expression limit, LogicalPlan child, List groupings) { - this(source, limit, child, groupings, false); + public LimitBy(Source source, Expression limitPerGroup, LogicalPlan child, List groupings) { + this(source, limitPerGroup, child, groupings, false); } - public LimitBy(Source source, Expression limit, LogicalPlan child, List groupings, boolean duplicated) { + public LimitBy(Source source, Expression limitPerGroup, LogicalPlan child, List groupings, boolean duplicated) { super(source, child); - this.limit = limit; + this.limitPerGroup = limitPerGroup; this.groupings = groupings; this.duplicated = duplicated; } @@ -62,7 +62,7 @@ private LimitBy(StreamInput in) throws IOException { @Override public void writeTo(StreamOutput out) throws IOException { Source.EMPTY.writeTo(out); - out.writeNamedWriteable(limit()); + out.writeNamedWriteable(limitPerGroup()); out.writeNamedWriteable(child()); out.writeNamedWriteableCollection(groupings()); } @@ -74,16 +74,16 @@ public String getWriteableName() { @Override protected NodeInfo info() { - return NodeInfo.create(this, LimitBy::new, limit, child(), groupings, duplicated); + return NodeInfo.create(this, LimitBy::new, limitPerGroup, child(), groupings, duplicated); } @Override public LimitBy replaceChild(LogicalPlan newChild) { - return new LimitBy(source(), limit, newChild, groupings, duplicated); + return new LimitBy(source(), limitPerGroup, newChild, groupings, duplicated); } - public Expression limit() { - return limit; + public Expression limitPerGroup() { + return limitPerGroup; } public List groupings() { @@ -95,17 +95,17 @@ public boolean duplicated() { } public LimitBy withDuplicated(boolean duplicated) { - return new LimitBy(source(), limit, child(), groupings, duplicated); + return new LimitBy(source(), limitPerGroup, child(), groupings, duplicated); } @Override public boolean expressionsResolved() { - return limit.resolved() && Resolvables.resolved(groupings); + return limitPerGroup.resolved() && Resolvables.resolved(groupings); } @Override public int hashCode() { - return Objects.hash(limit, child(), duplicated, groupings); + return Objects.hash(limitPerGroup, child(), duplicated, groupings); } @Override @@ -119,14 +119,9 @@ public boolean equals(Object obj) { LimitBy other = (LimitBy) obj; - return Objects.equals(limit, other.limit) + return Objects.equals(limitPerGroup, other.limitPerGroup) && Objects.equals(child(), other.child()) && (duplicated == other.duplicated) && Objects.equals(groupings, other.groupings); } - - @Override - public ExecuteLocation executesOn() { - return ExecuteLocation.COORDINATOR; - } } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/physical/LimitByExec.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/physical/LimitByExec.java new file mode 100644 index 0000000000000..ee3f61a822256 --- /dev/null +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/physical/LimitByExec.java @@ -0,0 +1,123 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +package org.elasticsearch.xpack.esql.plan.physical; + +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.core.expression.Attribute; +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.core.type.DataType; +import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput; + +import java.io.IOException; +import java.util.List; +import java.util.Objects; + +/** + * Physical plan node for {@code LIMIT N BY expr1, expr2, ...}. + * Retains at most N rows per group defined by the grouping expressions. + */ +public class LimitByExec extends UnaryExec implements EstimatesRowSize { + public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry( + PhysicalPlan.class, + "LimitByExec", + LimitByExec::readFrom + ); + + private final Expression limitPerGroup; + private final List groupings; + private final Integer estimatedRowSize; + + public LimitByExec(Source source, PhysicalPlan child, Expression limitPerGroup, List groupings, Integer estimatedRowSize) { + super(source, child); + this.limitPerGroup = limitPerGroup; + this.groupings = groupings; + this.estimatedRowSize = estimatedRowSize; + } + + private static LimitByExec 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.readOptionalVInt(); + List groupings = in.readNamedWriteableCollectionAsList(Expression.class); + return new LimitByExec(source, child, limit, groupings, estimatedRowSize); + } + + @Override + public void writeTo(StreamOutput out) throws IOException { + Source.EMPTY.writeTo(out); + out.writeNamedWriteable(child()); + out.writeNamedWriteable(limitPerGroup()); + out.writeOptionalVInt(estimatedRowSize); + out.writeNamedWriteableCollection(groupings()); + } + + @Override + public String getWriteableName() { + return ENTRY.name; + } + + @Override + protected NodeInfo info() { + return NodeInfo.create(this, LimitByExec::new, child(), limitPerGroup, groupings, estimatedRowSize); + } + + @Override + public LimitByExec replaceChild(PhysicalPlan newChild) { + return new LimitByExec(source(), newChild, limitPerGroup, groupings, estimatedRowSize); + } + + public Expression limitPerGroup() { + return limitPerGroup; + } + + public List groupings() { + return groupings; + } + + public Integer estimatedRowSize() { + return estimatedRowSize; + } + + @Override + public PhysicalPlan estimateRowSize(State unused) { + final List output = output(); + EstimatesRowSize.State state = new EstimatesRowSize.State(); + final boolean needsSortedDocIds = output.stream().anyMatch(a -> a.dataType() == DataType.DOC_DATA_TYPE); + state.add(needsSortedDocIds, output); + int size = state.consumeAllFields(true); + size = Math.max(size, 1); + return Objects.equals(this.estimatedRowSize, size) ? this : new LimitByExec(source(), child(), limitPerGroup, groupings, size); + } + + @Override + public int hashCode() { + return Objects.hash(limitPerGroup, groupings, estimatedRowSize, child()); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (obj == null || getClass() != obj.getClass()) { + return false; + } + + LimitByExec other = (LimitByExec) obj; + return Objects.equals(limitPerGroup, other.limitPerGroup) + && 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 afe4c19c744a9..5a2fda2ffc49e 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; @@ -145,6 +146,7 @@ import org.elasticsearch.xpack.esql.plan.physical.FuseScoreEvalExec; import org.elasticsearch.xpack.esql.plan.physical.GrokExec; import org.elasticsearch.xpack.esql.plan.physical.HashJoinExec; +import org.elasticsearch.xpack.esql.plan.physical.LimitByExec; import org.elasticsearch.xpack.esql.plan.physical.LimitExec; import org.elasticsearch.xpack.esql.plan.physical.LocalSourceExec; import org.elasticsearch.xpack.esql.plan.physical.LookupJoinExec; @@ -311,6 +313,8 @@ private PhysicalOperation plan(PhysicalPlan node, LocalExecutionPlannerContext c return planProject(project, context); } else if (node instanceof FilterExec filter) { return planFilter(filter, context); + } else if (node instanceof LimitByExec limitBy) { + return planLimitBy(limitBy, context); } else if (node instanceof LimitExec limit) { return planLimit(limit, context); } else if (node instanceof MvExpandExec mvExpand) { @@ -568,12 +572,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 +603,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. @@ -1419,6 +1426,22 @@ private PhysicalOperation planLimit(LimitExec limit, LocalExecutionPlannerContex return source.with(new LimitOperator.Factory((Integer) limit.limit().fold(context.foldCtx)), source.layout); } + private PhysicalOperation planLimitBy(LimitByExec limitBy, LocalExecutionPlannerContext context) { + PhysicalOperation source = plan(limitBy.child(), context); + int limitValue = (Integer) limitBy.limitPerGroup().fold(context.foldCtx); + Layout layout = source.layout; + List groupKeys = limitBy.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) { PhysicalOperation source = plan(mvExpandExec.child(), context); int blockSize = 5000;// TODO estimate row size and use context.pageSize() 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 345c542f424fa..59ed80155ac60 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 @@ -18,6 +18,7 @@ import org.elasticsearch.xpack.esql.plan.logical.Filter; import org.elasticsearch.xpack.esql.plan.logical.LeafPlan; import org.elasticsearch.xpack.esql.plan.logical.Limit; +import org.elasticsearch.xpack.esql.plan.logical.LimitBy; import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; import org.elasticsearch.xpack.esql.plan.logical.MetricsInfo; import org.elasticsearch.xpack.esql.plan.logical.ParameterizedQuery; @@ -31,6 +32,7 @@ import org.elasticsearch.xpack.esql.plan.physical.EsSourceExec; import org.elasticsearch.xpack.esql.plan.physical.FragmentExec; import org.elasticsearch.xpack.esql.plan.physical.HashJoinExec; +import org.elasticsearch.xpack.esql.plan.physical.LimitByExec; import org.elasticsearch.xpack.esql.plan.physical.LimitExec; import org.elasticsearch.xpack.esql.plan.physical.LocalSourceExec; import org.elasticsearch.xpack.esql.plan.physical.LookupJoinExec; @@ -100,6 +102,10 @@ private PhysicalPlan mapUnary(UnaryPlan unary) { return new LimitExec(limit.source(), mappedChild, limit.limit(), null); } + if (unary instanceof LimitBy limitBy) { + return new LimitByExec(limitBy.source(), mappedChild, limitBy.limitPerGroup(), limitBy.groupings(), null); + } + if (unary instanceof TopN topN) { return new TopNExec(topN.source(), mappedChild, topN.order(), topN.limit(), null); } 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..6edbe82c38c2c 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 @@ -21,6 +21,7 @@ import org.elasticsearch.xpack.esql.plan.logical.Fork; import org.elasticsearch.xpack.esql.plan.logical.LeafPlan; import org.elasticsearch.xpack.esql.plan.logical.Limit; +import org.elasticsearch.xpack.esql.plan.logical.LimitBy; import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; import org.elasticsearch.xpack.esql.plan.logical.MetricsInfo; import org.elasticsearch.xpack.esql.plan.logical.PipelineBreaker; @@ -33,6 +34,7 @@ import org.elasticsearch.xpack.esql.plan.physical.ExchangeExec; import org.elasticsearch.xpack.esql.plan.physical.FragmentExec; import org.elasticsearch.xpack.esql.plan.physical.HashJoinExec; +import org.elasticsearch.xpack.esql.plan.physical.LimitByExec; import org.elasticsearch.xpack.esql.plan.physical.LimitExec; import org.elasticsearch.xpack.esql.plan.physical.LocalSourceExec; import org.elasticsearch.xpack.esql.plan.physical.LookupJoinExec; @@ -144,6 +146,11 @@ else if (aggregate.groupings() return new LimitExec(limit.source(), mappedChild, limit.limit(), null); } + if (unary instanceof LimitBy limitBy) { + mappedChild = addExchangeForFragment(limitBy, mappedChild); + return new LimitByExec(limitBy.source(), mappedChild, limitBy.limitPerGroup(), limitBy.groupings(), null); + } + if (unary instanceof TopN topN) { mappedChild = addExchangeForFragment(topN, mappedChild); var topNExec = new TopNExec(topN.source(), mappedChild, topN.order(), topN.limit(), null); 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 7c90938db3683..ad21f5f9b53ce 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 @@ -108,6 +108,7 @@ import org.elasticsearch.xpack.esql.plan.logical.InlineStats; import org.elasticsearch.xpack.esql.plan.logical.Insist; import org.elasticsearch.xpack.esql.plan.logical.Limit; +import org.elasticsearch.xpack.esql.plan.logical.LimitBy; import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; import org.elasticsearch.xpack.esql.plan.logical.Lookup; import org.elasticsearch.xpack.esql.plan.logical.MvExpand; @@ -1398,6 +1399,16 @@ public void testImplicitDefaultLimitAfterBreakerAndNonBreakers() { } } + public void testImplicitDefaultLimitAfterLimitBy() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + var plan = analyze("from test | limit 1 by emp_no"); + + var defaultLimit = as(plan, Limit.class); + assertThat(as(defaultLimit.limit(), Literal.class).value(), equalTo(DEFAULT_LIMIT)); + var limitBy = as(defaultLimit.child(), LimitBy.class); + assertThat(Expressions.names(limitBy.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 6ff5a9218d144..59e085d513c1d 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 @@ -3873,14 +3873,6 @@ public void testMMRLimitedInput() { } } - public void testLimitByNotEnabled() { - assumeTrue("requires snapshot builds", Build.current().isSnapshot()); - assertThat(error(""" - FROM test - | LIMIT 5 BY languages - """, defaultAnalyzer, VerificationException.class), containsString("LIMIT BY is not yet supported")); - } - public void testTopSnippetsQueryFoldableAfterOptimization() { query("FROM test | EVAL x = TOP_SNIPPETS(first_name, \"search terms\")"); } 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..a700ca07fc401 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 @@ -76,6 +76,7 @@ import org.elasticsearch.xpack.esql.plan.physical.FilterExec; import org.elasticsearch.xpack.esql.plan.physical.FragmentExec; import org.elasticsearch.xpack.esql.plan.physical.GrokExec; +import org.elasticsearch.xpack.esql.plan.physical.LimitByExec; import org.elasticsearch.xpack.esql.plan.physical.LimitExec; import org.elasticsearch.xpack.esql.plan.physical.LocalSourceExec; import org.elasticsearch.xpack.esql.plan.physical.LookupJoinExec; @@ -132,6 +133,7 @@ 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; /** @@ -2512,6 +2514,68 @@ public void testTopNUsesSortedInputFromDataNodes() { assertThat(sorts.getFirst().field().name(), equalTo("last_name")); } + public void testLimitByNotPushedToSource() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + var plan = plannerOptimizer.plan(""" + from test + | limit 10 by first_name + """); + + var limit = as(plan, LimitExec.class); + + var limitBy = as(limit.child(), LimitByExec.class); + assertThat(limitBy.limitPerGroup().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() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + var plan = plannerOptimizer.plan(""" + from test + | limit 5 by first_name, last_name + """); + + var limit = as(plan, LimitExec.class); + + var limitBy = as(limit.child(), LimitByExec.class); + assertThat(limitBy.limitPerGroup().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() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + var plan = plannerOptimizer.plan(""" + from test + | where salary > 1000 + | limit 10 by first_name + """); + + var limit = as(plan, LimitExec.class); + + var limitBy = as(limit.child(), LimitByExec.class); + assertThat(limitBy.limitPerGroup().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 a338ef1885211..1a56b30f9001f 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 @@ -10456,6 +10456,25 @@ public void testCombineOrderByThroughRegisteredDomain() { as(registeredDomain.child(), EsRelation.class); } + /** + *

{@code
+     * Limit[1000[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() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + var plan = plan(""" + FROM test + | LIMIT 0 BY emp_no + """); + + var defaultLimit = as(plan, Limit.class); + assertThat(((Literal) defaultLimit.limit()).value(), equalTo(1000)); + as(defaultLimit.child(), LocalRelation.class); + } + public void testTopSnippetsQueryMustBeFoldable() { VerificationException e = expectThrows(VerificationException.class, () -> plan(""" FROM test 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 3da6dba84e90d..04e8b483b1837 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 @@ -138,6 +138,7 @@ import org.elasticsearch.xpack.esql.plan.physical.FragmentExec; import org.elasticsearch.xpack.esql.plan.physical.GrokExec; import org.elasticsearch.xpack.esql.plan.physical.HashJoinExec; +import org.elasticsearch.xpack.esql.plan.physical.LimitByExec; import org.elasticsearch.xpack.esql.plan.physical.LimitExec; import org.elasticsearch.xpack.esql.plan.physical.LocalSourceExec; import org.elasticsearch.xpack.esql.plan.physical.LookupJoinExec; @@ -1539,6 +1540,236 @@ public void testPushLimitToSource() { assertThat(source.estimatedRowSize(), equalTo(allFieldRowSize + Integer.BYTES * 2)); } + /** + * {@code + * LimitExec[1000[INTEGER]] + * \_LimitByExec[10[INTEGER],[emp_no{f}#]] + * \_ExchangeExec[[_meta_field{f}#, emp_no{f}#, first_name{f}#, ..],false] + * \_ProjectExec[[_meta_field{f}#, emp_no{f}#, first_name{f}#, ..]] + * \_FieldExtractExec[_meta_field{f}#, first_name{f}#, gender{f}#, ..]<[],[]> + * \_LimitByExec[10[INTEGER],[emp_no{f}#]] + * \_FieldExtractExec[emp_no{f}#]<[],[]> + * \_EsQueryExec[test], indexMode[standard], limit[], sort[] + * } + */ + public void testLimitByNotPushedToSource() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + 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()); + } + + /** + * {@code + * LimitExec[1000[INTEGER]] + * \_LimitByExec[5[INTEGER],[first_name{f}#, last_name{f}#]] + * \_ExchangeExec[[_meta_field{f}#, emp_no{f}#, first_name{f}#, ..],false] + * \_ProjectExec[[_meta_field{f}#, emp_no{f}#, first_name{f}#, ..]] + * \_FieldExtractExec[_meta_field{f}#, emp_no{f}#, gender{f}#, ..]<[],[]> + * \_LimitByExec[5[INTEGER],[first_name{f}#, last_name{f}#]] + * \_FieldExtractExec[first_name{f}#, last_name{f}#]<[],[]> + * \_EsQueryExec[test], indexMode[standard], limit[], sort[] + * } + */ + public void testLimitByMultipleKeys() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + var optimized = optimizedPlan(physicalPlan(""" + from test + | limit 5 by first_name, last_name + """)); + + var defaultLimit = as(optimized, LimitExec.class); + + var limitBy = as(defaultLimit.child(), LimitByExec.class); + assertThat(limitBy.limitPerGroup().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())); + } + + /** + * {@code + * ProjectExec[[avg_salary{r}#, first_name{f}#]] + * \_EvalExec[[$$SUM$avg_salary$0{r$}# / $$COUNT$avg_salary$1{r$}# AS avg_salary#]] + * \_LimitExec[1000[INTEGER]] + * \_LimitByExec[5[INTEGER],[first_name{f}#]] + * \_AggregateExec[[first_name{f}#],[SUM(..) AS $$SUM$avg_salary$0#, COUNT(..) AS $$COUNT$avg_salary$1#, first_name{f}#],FINAL,..] + * \_ExchangeExec[[first_name{f}#, ..],true] + * \_AggregateExec[[first_name{f}#],[SUM(..) AS $$SUM$avg_salary$0#, COUNT(..) AS + * $$COUNT$avg_salary$1#, first_name{f}#],INITIAL,..] + * \_FieldExtractExec[first_name{f}#, salary{f}#]<[],[]> + * \_EsQueryExec[test], indexMode[standard], limit[], sort[] + * } + */ + public void testLimitByAfterStats() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + 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); + + var limitBy = as(defaultLimit.child(), LimitByExec.class); + assertThat(limitBy.limitPerGroup().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)); + } + + /** + * {@code + * EvalExec[[salary{f}#12 + 1[INTEGER] AS x#5]] + * \_LimitExec[1000[INTEGER],2276] + * \_LimitByExec[10[INTEGER],[first_name{f}#8],2276] + * \_ExchangeExec[[_meta_field{f}#13, emp_no{f}#7, first_name{f}#8, gender{f}#9, hire_date{f}#14, job{f}#15, job.raw{f}#16, + * languages{f}#10, last_name{f}#11, long_noidx{f}#17, salary{f}#12],false] + * \_ProjectExec[[_meta_field{f}#13, emp_no{f}#7, first_name{f}#8, gender{f}#9, hire_date{f}#14, job{f}#15, job.raw{f}#16, + * languages{f}#10, last_name{f}#11, long_noidx{f}#17, salary{f}#12]] + * \_FieldExtractExec[_meta_field{f}#13, emp_no{f}#7, gender{f}#9, hire_d..]<[],[]> + * \_LimitByExec[10[INTEGER],[first_name{f}#8],70] + * \_FieldExtractExec[first_name{f}#8]<[],[]> + * \_EsQueryExec[test], indexMode[standard], [_doc{f}#18], limit[], sort[] estimatedRowSize[2284] + * queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] + * } + */ + public void testLimitByAfterEval() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + 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); + + var limitBy = as(defaultLimit.child(), LimitByExec.class); + assertThat(limitBy.limitPerGroup().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())); + } + + /** + * {@code + * LimitExec[1000[INTEGER]] + * \_LimitByExec[10[INTEGER],[emp_no{f}#]] + * \_ExchangeExec[[_meta_field{f}#, emp_no{f}#, first_name{f}#, ..],false] + * \_ProjectExec[[_meta_field{f}#, emp_no{f}#, first_name{f}#, ..]] + * \_FieldExtractExec[_meta_field{f}#, first_name{f}#, gender{f}#, ..]<[],[]> + * \_LimitByExec[10[INTEGER],[emp_no{f}#]] + * \_FieldExtractExec[emp_no{f}#]<[],[]> + * \_EsQueryExec[test], indexMode[standard], query[{"range":{"emp_no":{"gt":0,..}}}], limit[], sort[] + * } + */ + public void testLimitByWithFilter() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + 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()); + } + + /** + * {@code + * ProjectExec[[_meta_field{f}#, emp_no{f}#, first_name{f}#, ..]] + * \_LimitExec[1000[INTEGER]] + * \_LimitByExec[10[INTEGER],[emp_no * 2{r}#]] + * \_ExchangeExec[[_meta_field{f}#, emp_no{f}#, first_name{f}#, .., emp_no * 2{r}#],false] + * \_ProjectExec[[_meta_field{f}#, emp_no{f}#, first_name{f}#, .., emp_no * 2{r}#]] + * \_FieldExtractExec[_meta_field{f}#, first_name{f}#, gender{f}#, ..]<[],[]> + * \_LimitByExec[10[INTEGER],[emp_no * 2{r}#]] + * \_EvalExec[[emp_no{f}# * 2[INTEGER] AS emp_no * 2#]] + * \_FieldExtractExec[emp_no{f}#]<[],[]> + * \_EsQueryExec[test], indexMode[standard], query[{"range":{"emp_no":{"gt":0,..}}}], limit[], sort[] + * } + */ + public void testLimitByExpressionWithEval() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + 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); + + var limitBy = as(defaultLimit.child(), LimitByExec.class); + assertThat(limitBy.limitPerGroup().fold(FoldContext.small()), is(10)); + assertThat(limitBy.groupings(), hasSize(1)); + var groupKey = as(limitBy.groupings().get(0), ReferenceAttribute.class); + // TODO Check the groupKey is contained in the exchange + 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)); + + 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")); + } + + /** + * {@code + * LimitExec[1000[INTEGER]] + * \_LocalSourceExec[[_meta_field{f}#, emp_no{f}#, first_name{f}#, ..],EMPTY] + * } + */ + public void testLimitByZero() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + var plan = optimizedPlan(physicalPlan(""" + FROM test + | LIMIT 0 BY emp_no + """)); + + var limitExec = as(plan, LimitExec.class); + assertThat(((Literal) limitExec.limit()).value(), equalTo(1000)); + as(limitExec.child(), LocalSourceExec.class); + } + /** * Expected * EvalExec[[emp_no{f}#5 * 10[INTEGER] AS emp_no_10]] diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneColumnsTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneColumnsTests.java index 8f66b9c783cc0..d8cca5e3e4dc8 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneColumnsTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneColumnsTests.java @@ -7,6 +7,7 @@ package org.elasticsearch.xpack.esql.optimizer.rules.logical; +import org.elasticsearch.xpack.esql.action.EsqlCapabilities; import org.elasticsearch.xpack.esql.core.expression.Alias; import org.elasticsearch.xpack.esql.core.expression.Attribute; import org.elasticsearch.xpack.esql.core.expression.Expressions; @@ -30,6 +31,7 @@ import org.elasticsearch.xpack.esql.plan.logical.Fork; import org.elasticsearch.xpack.esql.plan.logical.Grok; import org.elasticsearch.xpack.esql.plan.logical.Limit; +import org.elasticsearch.xpack.esql.plan.logical.LimitBy; import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; import org.elasticsearch.xpack.esql.plan.logical.Project; import org.elasticsearch.xpack.esql.plan.logical.TopN; @@ -2498,6 +2500,34 @@ public void testPruneColumnsInExternalRelationWithFilter() { assertThat(Expressions.names(prunedExt.output()), contains("col_a", "col_b")); } + /** + * Ensures that PruneColumns does not drop a column used by LIMIT BY even when a subsequent DROP removes it from the output. + *
{@code
+     * Project[[emp_no, first_name, ...excluding x]]
+     * \_LimitBy[1,[x]]
+     *   \_Eval[[salary + 4 AS x]]
+     *     \_Limit[1000]
+     *       \_EsRelation[test]
+     * }
+ */ + public void testPruneColumnsKeepsLimitByGrouping() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + var plan = plan(""" + from test + | eval x = salary + 4 + | limit 1 by x + | drop x + """); + + var project = as(plan, Project.class); + assertThat(Expressions.names(project.projections()), org.hamcrest.Matchers.not(hasItems("x"))); + var defaultLimit = as(project.child(), Limit.class); + var limitBy = as(defaultLimit.child(), LimitBy.class); + assertThat(Expressions.names(limitBy.groupings()), contains("x")); + var eval = as(limitBy.child(), Eval.class); + assertThat(Expressions.names(eval.fields()), contains("x")); + } + private static Attribute extAttr(String name, DataType type) { return new FieldAttribute(EMPTY, name, new EsField(name, type, Map.of(), false, EsField.TimeSeriesFieldType.NONE)); } 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..702d39c30621b --- /dev/null +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PruneLiteralsInLimitByTests.java @@ -0,0 +1,240 @@ +/* + * 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.action.EsqlCapabilities; +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.LimitBy; +import org.elasticsearch.xpack.esql.plan.logical.Project; +import org.junit.BeforeClass; + +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.equalTo; + +public class PruneLiteralsInLimitByTests extends AbstractLogicalPlanOptimizerTests { + + @BeforeClass + public static void checkLimitByCapability() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + } + + /** + * 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)); + 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)); + 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)); + 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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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)); + 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)); + 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)); + 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)); + 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)); + as(limit.child(), EsRelation.class); + } +} diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimitByTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimitByTests.java new file mode 100644 index 0000000000000..5b2113e902f80 --- /dev/null +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimitByTests.java @@ -0,0 +1,478 @@ +/* + * 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.action.EsqlCapabilities; +import org.elasticsearch.xpack.esql.core.expression.Expressions; +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.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; +import org.elasticsearch.xpack.esql.plan.logical.Filter; +import org.elasticsearch.xpack.esql.plan.logical.Fork; +import org.elasticsearch.xpack.esql.plan.logical.Limit; +import org.elasticsearch.xpack.esql.plan.logical.LimitBy; +import org.elasticsearch.xpack.esql.plan.logical.MvExpand; +import org.elasticsearch.xpack.esql.plan.logical.Project; +import org.elasticsearch.xpack.esql.plan.logical.TopN; +import org.elasticsearch.xpack.esql.plan.logical.join.Join; +import org.junit.BeforeClass; + +import java.util.List; + +import static org.elasticsearch.xpack.esql.EsqlTestUtils.as; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.equalTo; + +public class PushDownAndCombineLimitByTests extends AbstractLogicalPlanOptimizerTests { + + @BeforeClass + public static void checkLimitByCapability() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + } + + /** + *
{@code
+     * Limit[1000[INTEGER],false,false]
+     * \_LimitBy[1[INTEGER],[emp_no{f}#6],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(1000)); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).value(), equalTo(1)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + } + + /** + *
{@code
+     * Limit[1000[INTEGER],false,false]
+     * \_LimitBy[1[INTEGER],[first_name{f}#6],false]
+     *   \_LimitBy[1[INTEGER],[emp_no{f}#5],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(1000)); + var limit1 = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit1.limitPerGroup()).value(), equalTo(1)); + assertThat(limit1.groupings().size(), equalTo(1)); + assertThat(Expressions.names(limit1.groupings()), contains("first_name")); + var limit2 = as(limit1.child(), LimitBy.class); + assertThat(((Literal) limit2.limitPerGroup()).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(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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)); + var limit3 = as(limit2.child(), LimitBy.class); + assertThat(((Literal) limit3.limitPerGroup()).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]]
+     *   \_LimitBy[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(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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[1000[INTEGER],false,false]
+     * \_LimitBy[5[INTEGER],[language_name{f}#N],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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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[1000[INTEGER],false,false]
+     * \_LimitBy[5[INTEGER],[language_name{f}#N],false]
+     *   \_Enrich[REMOTE,languages_remote,first_name{f}#N,...]
+     *     \_EsRelation[test][...]
+     * }
+ */ + public void testLimitByDuplicatedBelowRemoteEnrichWhenGroupingReferencesEnrichField() { + var plan = plan(""" + FROM test + | ENRICH _remote:languages_remote ON first_name + | LIMIT 5 BY language_name + """); + + var defaultLimit = as(plan, Limit.class); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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[1000[INTEGER],false,false]
+     * \_LimitBy[5[INTEGER],[language_name{f}#N],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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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[1000[INTEGER],false,false]
+     * \_LimitBy[5[INTEGER],[emp_no{f}#6, language_name{r}#20],false]
+     *   \_Enrich[ANY,languages_idx[KEYWORD],first_name{f}#7,...]
+     *     \_EsRelation[test][...]
+     * }
+ */ + public void testLimitByNotDuplicatedBelowLocalEnrichWhenSomeGroupingReferencesEnrichField() { + var plan = plan(""" + FROM test + | ENRICH languages_idx ON first_name + | LIMIT 5 BY emp_no, language_name + """); + + var defaultLimit = as(plan, Limit.class); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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[1000[INTEGER],false,false]
+     *   \_LimitBy[5[INTEGER],[emp_no{f}#N],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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).value(), equalTo(5)); + assertThat(Expressions.names(limit.groupings()), contains("emp_no")); + var fork = as(limit.child(), Fork.class); + for (var branch : fork.children()) { + var project = as(branch, Project.class); + var eval = as(project.child(), Eval.class); + var branchLimit = as(eval.child(), Limit.class); + as(branchLimit.child(), Filter.class); + } + } + + /** + * MV_EXPAND can increase the number of rows, so we duplicate the LimitBy: keep the original above and add a copy below. + *
{@code
+     * Limit[1000[INTEGER],false,false]
+     * \_LimitBy[5,duplicated,[emp_no{f}#N]]
+     *   \_MvExpand[first_name{f}#N]
+     *     \_LimitBy[5,[emp_no{f}#N]]
+     *       \_EsRelation[test][...]
+     * }
+ */ + public void testLimitByDuplicatedPastMvExpand() { + var plan = plan(""" + FROM test + | MV_EXPAND first_name + | LIMIT 5 BY emp_no + """); + + var defaultLimit = as(plan, Limit.class); + var upperLimitBy = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) upperLimitBy.limitPerGroup()).value(), equalTo(5)); + assertThat(Expressions.names(upperLimitBy.groupings()), contains("emp_no")); + assertTrue(upperLimitBy.duplicated()); + + var mvExpand = as(upperLimitBy.child(), MvExpand.class); + var lowerLimitBy = as(mvExpand.child(), LimitBy.class); + assertThat(((Literal) lowerLimitBy.limitPerGroup()).value(), equalTo(5)); + assertThat(Expressions.names(lowerLimitBy.groupings()), contains("emp_no")); + assertFalse(lowerLimitBy.duplicated()); + + as(lowerLimitBy.child(), EsRelation.class); + } + + /** + * A LEFT JOIN (LOOKUP JOIN) can increase the number of rows, so we duplicate the LimitBy: keep the original above + * and add a copy on the left (first) grandchild. The inner LimitBy is then pushed below the Eval by + * {@link PushDownAndCombineLimitBy} because emp_no does not depend on the Eval. + *
{@code
+     * Limit[1000[INTEGER],false,false]
+     * \_LimitBy[5,duplicated,[emp_no{f}#N]]
+     *   \_Join[LEFT,[language_code{r}#N],[language_code{f}#N]]
+     *     |_Eval[[languages{f}#N AS language_code#N]]
+     *     | \_LimitBy[5,[emp_no{f}#N]]
+     *     |   \_EsRelation[test][...]
+     *     \_EsRelation[languages_lookup][LOOKUP][...]
+     * }
+ */ + public void testLimitByOriginalFieldDuplicated() { + var plan = plan(""" + FROM test + | EVAL language_code = languages + | LOOKUP JOIN languages_lookup ON language_code + | LIMIT 5 BY emp_no + """); + + var defaultLimit = as(plan, Limit.class); + var upperLimitBy = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) upperLimitBy.limitPerGroup()).value(), equalTo(5)); + assertThat(Expressions.names(upperLimitBy.groupings()), contains("emp_no")); + assertTrue(upperLimitBy.duplicated()); + + var join = as(upperLimitBy.child(), Join.class); + var eval = as(join.left(), Eval.class); + var lowerLimitBy = as(eval.child(), LimitBy.class); + assertThat(((Literal) lowerLimitBy.limitPerGroup()).value(), equalTo(5)); + assertThat(Expressions.names(lowerLimitBy.groupings()), contains("emp_no")); + assertFalse(lowerLimitBy.duplicated()); + as(lowerLimitBy.child(), EsRelation.class); + as(join.right(), EsRelation.class); + } + + /** + * A grouped LIMIT (LIMIT BY) whose grouping references a field introduced by a LEFT JOIN (from the right side) + * must not be duplicated below the join, because the field would not exist there. + *
{@code
+     * Limit[1000[INTEGER],false,false]
+     * \_LimitBy[5,[language_name{f}#N],false]
+     *   \_Join[LEFT,[language_code{r}#N],[language_code{f}#N]]
+     *     |_Eval[[languages{f}#N AS language_code#N]]
+     *     | \_EsRelation[test][...]
+     *     \_EsRelation[languages_lookup][LOOKUP][...]
+     * }
+ */ + public void testLimitByFieldIntroducedInTheJoinNotDuplicated() { + var plan = plan(""" + FROM test + | EVAL language_code = languages + | LOOKUP JOIN languages_lookup ON language_code + | LIMIT 5 BY language_name + """); + + var defaultLimit = as(plan, Limit.class); + var limitBy = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limitBy.limitPerGroup()).value(), equalTo(5)); + assertThat(Expressions.names(limitBy.groupings()), contains("language_name")); + assertFalse(limitBy.duplicated()); + + var join = as(limitBy.child(), Join.class); + var eval = as(join.left(), Eval.class); + as(eval.child(), EsRelation.class); + } + + /** + * We cannot duplicate the LIMIT BY if we limit by a shadowed non-join field + * + *
{@code
+     * Limit[1000[INTEGER],false,false]
+     * \_LimitBy[5[INTEGER],[language_name{f}#23],false]
+     *   \_Join[LEFT,[language_code{r}#5],[language_code{f}#22],null]
+     *     |_Eval[[languages{f}#14 AS language_code#5]]
+     *     | \_EsRelation[test][_meta_field{f}#17, emp_no{f}#11, first_name{f}#12, ..]
+     *     \_EsRelation[languages_lookup][LOOKUP][language_code{f}#22, language_name{f}#23]
+     * }
+ */ + public void testLimitByShadowedNonJoinFieldNotDuplicated() { + var plan = plan(""" + FROM test + | EVAL language_code = languages + | EVAL language_name = 2*salary + | LOOKUP JOIN languages_lookup ON language_code + | LIMIT 5 BY language_name + """); + + var defaultLimit = as(plan, Limit.class); + var upperLimitBy = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) upperLimitBy.limitPerGroup()).value(), equalTo(5)); + assertThat(Expressions.names(upperLimitBy.groupings()), contains("language_name")); + assertFalse(upperLimitBy.duplicated()); + + var join = as(upperLimitBy.child(), Join.class); + var eval = as(join.left(), Eval.class); + as(eval.child(), EsRelation.class); + as(join.right(), EsRelation.class); + } + + /** + * We duplicate the LIMIT BY if we limit by a shadowed join field + * + *
{@code
+     * Limit[1000[INTEGER],false,false]
+     * \_LimitBy[5[INTEGER],[language_code{r}#5],true]
+     *   \_Join[LEFT,[language_code{r}#5],[language_code{f}#22],null]
+     *     |_LimitBy[5[INTEGER],[language_code{r}#5],false]
+     *     | \_Project[[_meta_field{f}#17, emp_no{f}#11, first_name{f}#12, gender{f}#13, hire_date{f}#18, job{f}#19, job.raw{f}#20,
+     *     |           languages{f}#14 AS language_code#5, last_name{f}#15, long_noidx{f}#21, salary{f}#16]]
+     *     |   \_EsRelation[test][_meta_field{f}#17, emp_no{f}#11, first_name{f}#12, ..]
+     *     \_EsRelation[languages_lookup][LOOKUP][language_code{f}#22, language_name{f}#23]
+     * }
+ */ + public void testLimitByShadowedJoinFieldDuplicated() { + var plan = plan(""" + FROM test + | RENAME languages AS language_code + | EVAL language_name = 2*salary + | LOOKUP JOIN languages_lookup ON language_code + | LIMIT 5 BY language_code + """); + + var defaultLimit = as(plan, Limit.class); + var upperLimitBy = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) upperLimitBy.limitPerGroup()).value(), equalTo(5)); + assertThat(Expressions.names(upperLimitBy.groupings()), contains("language_code")); + assertTrue(upperLimitBy.duplicated()); + + var join = as(upperLimitBy.child(), Join.class); + var lowerLimitBy = as(join.left(), LimitBy.class); + assertThat(((Literal) lowerLimitBy.limitPerGroup()).value(), equalTo(5)); + assertThat(lowerLimitBy.groupings(), equalTo(upperLimitBy.groupings())); + assertFalse(lowerLimitBy.duplicated()); + var project = as(lowerLimitBy.child(), Project.class); + as(project.child(), EsRelation.class); + as(join.right(), EsRelation.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..806d616c4db70 --- /dev/null +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/ReplaceLimitByExpressionWithEvalTests.java @@ -0,0 +1,355 @@ +/* + * 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.action.EsqlCapabilities; +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.LimitBy; +import org.elasticsearch.xpack.esql.plan.logical.Project; +import org.junit.BeforeClass; + +import static org.elasticsearch.xpack.esql.EsqlTestUtils.as; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.startsWith; + +public class ReplaceLimitByExpressionWithEvalTests extends AbstractLogicalPlanOptimizerTests { + + @BeforeClass + public static void checkLimitByCapability() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + } + + /** + * 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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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)); + 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)); + 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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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]
+     *   \_LimitBy[1[INTEGER],[$$limit_by$0$N{r}#M],false,false]
+     *     \_Eval[[emp_no{f}#N + 5[INTEGER] AS $$limit_by$0$N]]
+     *       \_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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).value(), equalTo(1)); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(1)); + var alias = as(eval.fields().getFirst(), Alias.class); + assertThat(alias.name(), startsWith("$$limit_by$0$")); + 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]
+     *   \_LimitBy[1[INTEGER],[$$limit_by$0$A{r}#X, $$limit_by$1$B{r}#Y],false,false]
+     *     \_Eval[[emp_no{f}#N + 5[INTEGER] AS $$limit_by$0$A, salary{f}#M * 2[INTEGER] AS $$limit_by$1$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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).value(), equalTo(1)); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(2)); + var alias0 = as(eval.fields().get(0), Alias.class); + assertThat(alias0.name(), startsWith("$$limit_by$0$")); + as(alias0.child(), Add.class); + var alias1 = as(eval.fields().get(1), Alias.class); + assertThat(alias1.name(), startsWith("$$limit_by$1$")); + 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]
+     *   \_LimitBy[1[INTEGER],[emp_no{f}#N, $$limit_by$1$A{r}#X],false,false]
+     *     \_Eval[[salary{f}#M * 2[INTEGER] AS $$limit_by$1$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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).value(), equalTo(1)); + assertThat(limit.groupings(), hasSize(2)); + assertThat(Expressions.name(limit.groupings().get(0)), equalTo("emp_no")); + assertThat(Expressions.name(limit.groupings().get(1)), startsWith("$$limit_by$1$")); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(1)); + var alias = as(eval.fields().getFirst(), Alias.class); + assertThat(alias.name(), startsWith("$$limit_by$1$")); + 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]
+     *   \_LimitBy[1[INTEGER],[$$limit_by$0$N{r}#M],false,false]
+     *     \_Eval[[emp_no{f}#N + 5[INTEGER] AS $$limit_by$0$N]]
+     *       \_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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).value(), equalTo(1)); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(1)); + var alias = as(eval.fields().getFirst(), Alias.class); + assertThat(alias.name(), startsWith("$$limit_by$0$")); + 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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).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]
+     *   \_LimitBy[1[INTEGER],[x{r}#A, $$limit_by$1$B{r}#Y],false,false]
+     *     \_Eval[[emp_no{f}#M + 5[INTEGER] AS x, salary{f}#M * 2[INTEGER] AS $$limit_by$1$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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).value(), equalTo(1)); + assertThat(limit.groupings(), hasSize(2)); + assertThat(Expressions.name(limit.groupings().get(0)), equalTo("x")); + assertThat(Expressions.name(limit.groupings().get(1)), startsWith("$$limit_by$1$")); + 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(), startsWith("$$limit_by$1$")); + 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]
+     *   \_LimitBy[1[INTEGER],[emp_no{f}#N, $$limit_by$1$A{r}#X],false,false]
+     *     \_Eval[[salary{f}#M * 2[INTEGER] AS $$limit_by$1$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); + var limit = as(defaultLimit.child(), LimitBy.class); + assertThat(((Literal) limit.limitPerGroup()).value(), equalTo(1)); + assertThat(limit.groupings(), hasSize(2)); + assertThat(Expressions.name(limit.groupings().get(0)), equalTo("emp_no")); + assertThat(Expressions.name(limit.groupings().get(1)), startsWith("$$limit_by$1$")); + var eval = as(limit.child(), Eval.class); + assertThat(eval.fields(), hasSize(1)); + var alias = as(eval.fields().getFirst(), Alias.class); + assertThat(alias.name(), startsWith("$$limit_by$1$")); + 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/LimitByGoldenTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/LimitByGoldenTests.java new file mode 100644 index 0000000000000..9046794234539 --- /dev/null +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/LimitByGoldenTests.java @@ -0,0 +1,49 @@ +/* + * 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.physical.local; + +import org.elasticsearch.xpack.esql.EsqlTestUtils; +import org.elasticsearch.xpack.esql.action.EsqlCapabilities; +import org.elasticsearch.xpack.esql.optimizer.GoldenTestCase; +import org.junit.BeforeClass; + +import java.util.EnumSet; +import java.util.Map; + +import static org.elasticsearch.xpack.esql.type.EsqlDataTypeConverter.dateTimeToLong; + +public class LimitByGoldenTests extends GoldenTestCase { + + @BeforeClass + public static void checkLimitByCapability() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + } + + public void testLimitByWithoutSort() { + runGoldenTest( + """ + FROM employees + | LIMIT 5 BY emp_no + 4, languages + """, + EnumSet.of( + Stage.ANALYSIS, + Stage.LOGICAL_OPTIMIZATION, + Stage.PHYSICAL_OPTIMIZATION, + Stage.LOCAL_PHYSICAL_OPTIMIZATION, + Stage.NODE_REDUCE, + Stage.NODE_REDUCE_LOCAL_PHYSICAL_OPTIMIZATION + ), + STATS + ); + } + + private static final EsqlTestUtils.TestSearchStatsWithMinMax STATS = new EsqlTestUtils.TestSearchStatsWithMinMax( + Map.of("date", dateTimeToLong("2023-10-20T12:15:03.360Z")), + Map.of("date", dateTimeToLong("2023-10-23T13:55:01.543Z")) + ); +} 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 3984d680a683c..04ff47a73b1ba 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 @@ -1087,7 +1087,7 @@ public void testBasicLimitCommand() { } public void testLimitBy() { - assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.LIMIT_BY.isEnabled()); + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); LogicalPlan plan = query(""" FROM foo | SORT @timestamp DESC @@ -1095,16 +1095,14 @@ public void testLimitBy() { """); assertThat(plan, instanceOf(LimitBy.class)); LimitBy limitBy = (LimitBy) plan; - assertThat(limitBy.limit(), instanceOf(Literal.class)); - assertThat(((Literal) limitBy.limit()).value(), equalTo(10)); + assertThat(limitBy.limitPerGroup(), instanceOf(Literal.class)); + assertThat(((Literal) limitBy.limitPerGroup()).value(), equalTo(10)); assertThat(limitBy.groupings().size(), equalTo(2)); assertThat(limitBy.groupings().get(0), instanceOf(UnresolvedAttribute.class)); assertThat(((UnresolvedAttribute) limitBy.groupings().get(0)).name(), equalTo("hostname")); - assertThat(limitBy.groupings().get(1), instanceOf(Alias.class)); - Alias divAlias = (Alias) limitBy.groupings().get(1); - assertThat(divAlias.child(), instanceOf(Div.class)); - Div divExpr = (Div) divAlias.child(); + assertThat(limitBy.groupings().get(1), instanceOf(Div.class)); + Div divExpr = (Div) limitBy.groupings().get(1); assertThat(divExpr.left(), instanceOf(UnresolvedAttribute.class)); assertThat(((UnresolvedAttribute) divExpr.left()).name(), equalTo("@timestamp")); assertThat(divExpr.right(), instanceOf(Literal.class)); @@ -1127,7 +1125,7 @@ public void testLimitBy() { } public void testLimitByQualifiedName() { - assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.LIMIT_BY.isEnabled()); + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); LogicalPlan plan = query(""" FROM foo | SORT @timestamp DESC @@ -1135,8 +1133,8 @@ public void testLimitByQualifiedName() { """); assertThat(plan, instanceOf(LimitBy.class)); LimitBy limitBy = (LimitBy) plan; - assertThat(limitBy.limit(), instanceOf(Literal.class)); - assertThat(((Literal) limitBy.limit()).value(), equalTo(10)); + assertThat(limitBy.limitPerGroup(), instanceOf(Literal.class)); + assertThat(((Literal) limitBy.limitPerGroup()).value(), equalTo(10)); assertThat(limitBy.groupings(), everyItem(instanceOf(UnresolvedAttribute.class))); assertThat(limitBy.groupings().size(), equalTo(1)); @@ -1160,6 +1158,36 @@ public void testLimitByQualifiedName() { assertThat(((UnresolvedRelation) relation).indexPattern().indexPattern(), equalTo("foo")); } + public void testLimitByNegativeValue() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + expectThrows( + ParsingException.class, + containsString("value of [LIMIT -1 BY languages] must be a non negative integer, found value [-1] type [integer]"), + () -> query(""" + FROM foo + | LIMIT -1 BY languages + """) + ); + } + + public void testLimitByExpressionForN() { + assumeTrue("LIMIT BY requires snapshot builds", EsqlCapabilities.Cap.ESQL_LIMIT_BY.isEnabled()); + expectThrows(ParsingException.class, containsString("mismatched input '*'"), () -> query(""" + FROM foo + | LIMIT -1 * 42 BY languages + """)); + + expectThrows(ParsingException.class, containsString("mismatched input '*'"), () -> query(""" + FROM foo + | LIMIT -1 * -42 BY languages + """)); + + expectThrows(ParsingException.class, containsString("mismatched input '+'"), () -> query(""" + FROM foo + | LIMIT -1 + 5 BY languages + """)); + } + 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/LimitBySerializationTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/logical/LimitBySerializationTests.java index d672359bb1e47..ce4864f4c0b1e 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/logical/LimitBySerializationTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/logical/LimitBySerializationTests.java @@ -19,26 +19,26 @@ public class LimitBySerializationTests extends AbstractLogicalPlanSerializationT @Override protected LimitBy createTestInstance() { Source source = randomSource(); - Expression limit = FieldAttributeTests.createFieldAttribute(0, false); + Expression limitPerGroup = FieldAttributeTests.createFieldAttribute(0, false); LogicalPlan child = randomChild(0); List groupings = randomGroupings(); - return new LimitBy(source, limit, child, groupings, randomBoolean()); + return new LimitBy(source, limitPerGroup, child, groupings, randomBoolean()); } @Override protected LimitBy mutateInstance(LimitBy instance) throws IOException { - Expression limit = instance.limit(); + Expression limitPerGroup = instance.limitPerGroup(); LogicalPlan child = instance.child(); List groupings = instance.groupings(); boolean duplicated = instance.duplicated(); switch (randomIntBetween(0, 3)) { - case 0 -> limit = randomValueOtherThan(limit, () -> FieldAttributeTests.createFieldAttribute(0, false)); + case 0 -> limitPerGroup = randomValueOtherThan(limitPerGroup, () -> FieldAttributeTests.createFieldAttribute(0, false)); case 1 -> child = randomValueOtherThan(child, () -> randomChild(0)); case 2 -> groupings = randomValueOtherThan(groupings, LimitBySerializationTests::randomGroupings); case 3 -> duplicated = duplicated == false; default -> throw new IllegalStateException("Should never reach here"); } - return new LimitBy(instance.source(), limit, child, groupings, duplicated); + return new LimitBy(instance.source(), limitPerGroup, child, groupings, duplicated); } @Override diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/LimitByExecSerializationTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/LimitByExecSerializationTests.java new file mode 100644 index 0000000000000..8f1a487d968b1 --- /dev/null +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/LimitByExecSerializationTests.java @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +package org.elasticsearch.xpack.esql.plan.physical; + +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; + +public class LimitByExecSerializationTests extends AbstractPhysicalPlanSerializationTests { + + public static LimitByExec randomLimitByExec(int depth) { + Source source = randomSource(); + PhysicalPlan child = randomChild(depth); + Expression limitPerGroup = randomLimitPerGroup(); + List groupings = randomGroupings(); + return new LimitByExec(source, child, limitPerGroup, groupings, randomEstimatedRowSize()); + } + + private static Expression randomLimitPerGroup() { + return new Literal(randomSource(), between(0, Integer.MAX_VALUE), DataType.INTEGER); + } + + private static List randomGroupings() { + return randomList(1, 3, () -> FieldAttributeTests.createFieldAttribute(0, false)); + } + + @Override + protected LimitByExec createTestInstance() { + return randomLimitByExec(0); + } + + @Override + protected LimitByExec mutateInstance(LimitByExec instance) throws IOException { + PhysicalPlan child = instance.child(); + Expression limitPerGroup = instance.limitPerGroup(); + List groupings = instance.groupings(); + Integer estimatedRowSize = instance.estimatedRowSize(); + switch (between(0, 3)) { + case 0 -> child = randomValueOtherThan(child, () -> randomChild(0)); + case 1 -> limitPerGroup = randomValueOtherThan(limitPerGroup, LimitByExecSerializationTests::randomLimitPerGroup); + case 2 -> groupings = randomValueOtherThan(groupings, LimitByExecSerializationTests::randomGroupings); + case 3 -> estimatedRowSize = randomValueOtherThan(estimatedRowSize, LimitByExecSerializationTests::randomEstimatedRowSize); + default -> throw new AssertionError("Unexpected case"); + } + return new LimitByExec(instance.source(), child, limitPerGroup, groupings, estimatedRowSize); + } + + @Override + protected boolean alwaysEmptySource() { + return true; + } +} diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/analysis.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/analysis.expected new file mode 100644 index 0000000000000..aa83a0f05a94f --- /dev/null +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/analysis.expected @@ -0,0 +1,3 @@ +Limit[1000[INTEGER],false,false] +\_LimitBy[5[INTEGER],[emp_no{f}#0 + 4[INTEGER], languages{f}#1],false] + \_EsRelation[employees][avg_worked_seconds{f}#2, birth_date{f}#3, emp_no{f}#0, first_name{f}#4, gender{f}#5, height{f}#6, height.float{f}#7, height.half_float{f}#8, height.scaled_float{f}#9, hire_date{f}#10, is_rehired{f}#11, job_positions{f}#12, languages{f}#1, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_physical_optimization.expected new file mode 100644 index 0000000000000..302d4c001bc5d --- /dev/null +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_physical_optimization.expected @@ -0,0 +1,11 @@ +ProjectExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22]] +\_LimitExec[1000[INTEGER],null] + \_LimitByExec[5[INTEGER],[$$limit_by$0{r$}#23, languages{f}#12],null] + \_ExchangeExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23],false] + \_ProjectExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23]] + \_FieldExtractExec[avg_worked_seconds{f}#0, birth_date{f}#1, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22]<[],[],[]> + \_LimitByExec[5[INTEGER],[$$limit_by$0{r$}#23, languages{f}#12],32] + \_FieldExtractExec[languages{f}#12]<[],[],[]> + \_EvalExec[[emp_no{f}#2 + 4[INTEGER] AS $$limit_by$0#23]] + \_FieldExtractExec[emp_no{f}#2]<[],[],[]> + \_EsQueryExec[employees], indexMode[standard], [_doc{f}#24], limit[], sort[] estimatedRowSize[364] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_physical_optimization_data_driver.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_physical_optimization_data_driver.expected new file mode 100644 index 0000000000000..be6bcad490ed9 --- /dev/null +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_physical_optimization_data_driver.expected @@ -0,0 +1,8 @@ +ExchangeSinkExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23],false] +\_ProjectExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23]] + \_FieldExtractExec[avg_worked_seconds{f}#0, birth_date{f}#1, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22]<[],[],[]> + \_LimitByExec[5[INTEGER],[$$limit_by$0{r$}#23, languages{f}#12],32] + \_FieldExtractExec[languages{f}#12]<[],[],[]> + \_EvalExec[[emp_no{f}#2 + 4[INTEGER] AS $$limit_by$0#23]] + \_FieldExtractExec[emp_no{f}#2]<[],[],[]> + \_EsQueryExec[employees], indexMode[standard], [_doc{f}#24], limit[], sort[] estimatedRowSize[364] queryBuilderAndTags [[QueryBuilderAndTags[query=null, tags=[]]]] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_physical_optimization_reduce_driver.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_physical_optimization_reduce_driver.expected new file mode 100644 index 0000000000000..dabac829b0cf9 --- /dev/null +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_physical_optimization_reduce_driver.expected @@ -0,0 +1,3 @@ +ExchangeSinkExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23],false] +\_LimitByExec[5[INTEGER],[$$limit_by$0{r$}#23, languages{f}#12],360] + \_ExchangeSourceExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23],false] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_planned_data_driver.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_planned_data_driver.expected new file mode 100644 index 0000000000000..d58668df4f4ae --- /dev/null +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_planned_data_driver.expected @@ -0,0 +1,6 @@ +ExchangeSinkExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23],false] +\_FragmentExec[filter=null, estimatedRowSize=0, reducer=[], fragment=[<> +Project[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23]] +\_LimitBy[5[INTEGER],[$$limit_by$0{r$}#23, languages{f}#12],false] + \_Eval[[emp_no{f}#2 + 4[INTEGER] AS $$limit_by$0#23]] + \_EsRelation[employees][avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22]<>]] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_planned_reduce_driver.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_planned_reduce_driver.expected new file mode 100644 index 0000000000000..dabac829b0cf9 --- /dev/null +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/local_reduce_planned_reduce_driver.expected @@ -0,0 +1,3 @@ +ExchangeSinkExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23],false] +\_LimitByExec[5[INTEGER],[$$limit_by$0{r$}#23, languages{f}#12],360] + \_ExchangeSourceExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23],false] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/logical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/logical_optimization.expected new file mode 100644 index 0000000000000..a69f4f0bd76eb --- /dev/null +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/logical_optimization.expected @@ -0,0 +1,5 @@ +Project[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22]] +\_Limit[1000[INTEGER],false,false] + \_LimitBy[5[INTEGER],[$$limit_by$0{r$}#23, languages{f}#12],false] + \_Eval[[emp_no{f}#2 + 4[INTEGER] AS $$limit_by$0#23]] + \_EsRelation[employees][avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/physical_optimization.expected b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/physical_optimization.expected new file mode 100644 index 0000000000000..6623c9342e8aa --- /dev/null +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/physical_optimization.expected @@ -0,0 +1,9 @@ +ProjectExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22]] +\_LimitExec[1000[INTEGER],null] + \_LimitByExec[5[INTEGER],[$$limit_by$0{r$}#23, languages{f}#12],null] + \_ExchangeExec[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23],false] + \_FragmentExec[filter=null, estimatedRowSize=0, reducer=[], fragment=[<> +Project[[avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22, $$limit_by$0{r$}#23]] +\_LimitBy[5[INTEGER],[$$limit_by$0{r$}#23, languages{f}#12],false] + \_Eval[[emp_no{f}#2 + 4[INTEGER] AS $$limit_by$0#23]] + \_EsRelation[employees][avg_worked_seconds{f}#0, birth_date{f}#1, emp_no{f}#2, first_name{f}#3, gender{f}#4, height{f}#5, height.float{f}#6, height.half_float{f}#7, height.scaled_float{f}#8, hire_date{f}#9, is_rehired{f}#10, job_positions{f}#11, languages{f}#12, languages.byte{f}#13, languages.long{f}#14, languages.short{f}#15, last_name{f}#16, salary{f}#17, salary_change{f}#18, salary_change.int{f}#19, salary_change.keyword{f}#20, salary_change.long{f}#21, still_hired{f}#22]<>]] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/query.esql b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/query.esql new file mode 100644 index 0000000000000..41e8023b810db --- /dev/null +++ b/x-pack/plugin/esql/src/test/resources/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/golden_tests/LimitByGoldenTests/testLimitByWithoutSort/query.esql @@ -0,0 +1,2 @@ +FROM employees +| LIMIT 5 BY emp_no + 4, languages