Class PruneLiteralsInLimitBy
java.lang.Object
org.elasticsearch.xpack.esql.rule.Rule<LimitBy,LogicalPlan>
org.elasticsearch.xpack.esql.optimizer.rules.logical.OptimizerRules.OptimizerRule<LimitBy>
org.elasticsearch.xpack.esql.optimizer.rules.logical.PruneLiteralsInLimitBy
Prune foldable groupings from
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 LIMIT BY degenerates to a plain LIMIT.
Groupings arrive from the parser as either raw Attributes
or Alias nodes wrapping the expression. Expression.foldable() is always false,
so we unwrap to check the child.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.elasticsearch.xpack.esql.optimizer.rules.logical.OptimizerRules.OptimizerRule
apply
-
Constructor Details
-
PruneLiteralsInLimitBy
public PruneLiteralsInLimitBy()
-
-
Method Details
-
rule
- Specified by:
rulein classOptimizerRules.OptimizerRule<LimitBy>
-