Class PushDownAndCombineFilters


public final class PushDownAndCombineFilters extends OptimizerRules.OptimizerRule<Filter>
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.