InferFiltersFromConstraints Logical Optimization Rule

InferFiltersFromConstraints is a Catalyst rule for transforming logical plans (i.e. Rule[LogicalPlan]).

When executed, InferFiltersFromConstraints simply inferFilters when spark.sql.constraintPropagation.enabled configuration property is enabled (true).

InferFiltersFromConstraints is a part of the Infer Filters once-executed rule batch of the base Catalyst Optimizer.

inferFilters Internal Method

inferFilters(
  plan: LogicalPlan): LogicalPlan

inferFilters supports Filter and Join logical operators.

For Filter logical operators, inferFilters…​FIXME

For Join logical operators, inferFilters branches off per the join type:

  • For InnerLike and LeftSemi…​FIXME

  • For RightOuter…​FIXME

  • For LeftOuter and LeftAnti, inferFilters getAllConstraints and then replaces the right join operator with inferNewFilter

Note
inferFilters is used when InferFiltersFromConstraints is executed.

getAllConstraints Internal Method

getAllConstraints(
  left: LogicalPlan,
  right: LogicalPlan,
  conditionOpt: Option[Expression]): Set[Expression]

getAllConstraints…​FIXME

Note
getAllConstraints is used when…​FIXME

Adding Filter — inferNewFilter Internal Method

inferNewFilter(
  plan: LogicalPlan,
  constraints: Set[Expression]): LogicalPlan

inferNewFilter…​FIXME

Note
inferNewFilter is used when…​FIXME

results matching ""

    No results matching ""