Class PruneLiteralsInChangePointBy
java.lang.Object
org.elasticsearch.xpack.esql.rule.Rule<ChangePoint,LogicalPlan>
org.elasticsearch.xpack.esql.optimizer.rules.logical.OptimizerRules.OptimizerRule<ChangePoint>
org.elasticsearch.xpack.esql.optimizer.rules.logical.PruneLiteralsInChangePointBy
Prune foldable groupings from
CHANGE_POINT BY. A foldable expression evaluates to the same constant for every row,
so it has no grouping effect and can be dropped. Unlike PruneLiteralsInLimitBy, an all-foldable BY clause
simply degenerates to an ungrouped CHANGE_POINT — there is no simpler plan node to substitute.
Groupings arrive from the parser as either raw Attributes
or Alias nodes wrapping the expression (introduced by ReplaceChangePointByExpressionWithEval).
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
-
PruneLiteralsInChangePointBy
public PruneLiteralsInChangePointBy()
-
-
Method Details
-
rule
- Specified by:
rulein classOptimizerRules.OptimizerRule<ChangePoint>
-