Skip to content

EliminateJoinToEmptyRelation Logical Optimization

EliminateJoinToEmptyRelation is a logical optimization in Adaptive Query Execution.

EliminateJoinToEmptyRelation is a Catalyst rule for transforming logical plans (Rule[LogicalPlan]).

Creating Instance

EliminateJoinToEmptyRelation takes no arguments to be created.

EliminateJoinToEmptyRelation is created when:

  • AQEOptimizer is requested for the batches

Executing Rule

apply(
  plan: LogicalPlan): LogicalPlan

apply is part of the Rule abstraction.

apply transforms Join logical operators (LeftAnti, Inner and LeftSemi) to empty LocalRelation leaf logical operators.

canEliminate

canEliminate(
  plan: LogicalPlan,
  relation: HashedRelation): Boolean

canEliminate is true when the input LogicalPlan is a LogicalQueryStage with a materialized BroadcastQueryStageExec with the result being the input HashedRelation.


Last update: 2021-05-02
Back to top