File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -733,9 +733,8 @@ object ReorderJoin extends Rule[LogicalPlan] with PredicateHelper {
733
733
// find out the first join that have at least one join condition
734
734
val conditionalJoin = rest.find { plan =>
735
735
val refs = left.outputSet ++ plan.outputSet
736
- conditions.filterNot(_.references.subsetOf(left.outputSet))
737
- .filterNot(_.references.subsetOf(plan.outputSet))
738
- .exists(cond => cond.references.subsetOf(refs))
736
+ conditions.filterNot(canEvaluate(_, left)).filterNot(canEvaluate(_, plan))
737
+ .exists(_.references.subsetOf(refs))
739
738
}
740
739
// pick the next one if no condition left
741
740
val right = conditionalJoin.getOrElse(rest.head)
You can’t perform that action at this time.
0 commit comments