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

  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.


  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.

Back to top