Class PushDownAndCombineFilters
java.lang.Object
org.elasticsearch.xpack.esql.rule.Rule<Filter,LogicalPlan>
org.elasticsearch.xpack.esql.optimizer.rules.logical.OptimizerRules.OptimizerRule<Filter>
org.elasticsearch.xpack.esql.optimizer.rules.logical.PushDownAndCombineFilters
Perform filters as early as possible in the logical plan by pushing them past certain plan nodes (like
Eval,
RegexExtract, Enrich, Project, OrderBy and left Joins) where possible.
Ideally, the filter ends up all the way down at the data source and can be turned into a Lucene query.
When pushing down past nodes, only conditions that do not depend on fields created by those nodes are pushed down; if the condition
consists of ANDs, we split out the parts that do not depend on the previous node.
For joins, it splits the filter condition into parts that can be applied to the left or right side of the join and only pushes down
the left hand side filters to the left child.
Also combines adjacent filters using a logical AND.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.elasticsearch.xpack.esql.optimizer.rules.logical.OptimizerRules.OptimizerRule
apply
-
Constructor Details
-
PushDownAndCombineFilters
public PushDownAndCombineFilters()
-
-
Method Details
-
rule
- Specified by:
rulein classOptimizerRules.OptimizerRule<Filter>
-