File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
main/scala/org/apache/spark/sql/catalyst/optimizer
test/scala/org/apache/spark/sql/catalyst/optimizer Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ object DefaultOptimizer extends Optimizer {
4242 // Operator push down
4343 SetOperationPushDown ,
4444 SamplePushDown ,
45- ReorderInnerJoin ,
45+ ReorderJoin ,
4646 PushPredicateThroughJoin ,
4747 PushPredicateThroughProject ,
4848 PushPredicateThroughGenerate ,
@@ -711,12 +711,13 @@ object PushPredicateThroughAggregate extends Rule[LogicalPlan] with PredicateHel
711711}
712712
713713/**
714- * Reorder the inner joins so that the bottom ones have at least one condition.
715- *
716- * TODO: support outer joins
714+ * Reorder the joins so that the bottom ones have at least one condition.
717715 */
718- object ReorderInnerJoin extends Rule [LogicalPlan ] with PredicateHelper {
716+ object ReorderJoin extends Rule [LogicalPlan ] with PredicateHelper {
719717
718+ /**
719+ * Reorder the joins so that the bottom ones have at least one condition.
720+ */
720721 def reorder (
721722 input : LogicalPlan ,
722723 joins : Seq [LogicalPlan ],
@@ -744,6 +745,7 @@ object ReorderInnerJoin extends Rule[LogicalPlan] with PredicateHelper {
744745 }
745746
746747 def apply (plan : LogicalPlan ): LogicalPlan = plan transform {
748+ // TODO: support outer join
747749 case FilterAndInnerJoins (input, joins, filterConditions) if joins.size > 1 =>
748750 assert(filterConditions.nonEmpty)
749751 val joined = reorder(input, joins, filterConditions)
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class FilterPushdownSuite extends PlanTest {
3838 CombineFilters ,
3939 PushPredicateThroughProject ,
4040 BooleanSimplification ,
41- ReorderInnerJoin ,
41+ ReorderJoin ,
4242 PushPredicateThroughJoin ,
4343 PushPredicateThroughGenerate ,
4444 PushPredicateThroughAggregate ,
You can’t perform that action at this time.
0 commit comments