Skip to content

Commit 43d38a6

Browse files
Revert optimization for BroadcastNestedLoopJoin (this fixes tests).
1 parent 0ef9e5b commit 43d38a6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,8 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
152152
object BroadcastNestedLoopJoin extends Strategy {
153153
def apply(plan: LogicalPlan): Seq[SparkPlan] = plan match {
154154
case logical.Join(left, right, joinType, condition) =>
155-
val (streamed, broadcast) =
156-
if (right.statistics.sizeInBytes <= left.statistics.sizeInBytes) (left, right)
157-
else (right, left)
158155
execution.BroadcastNestedLoopJoin(
159-
planLater(streamed), planLater(broadcast), joinType, condition)(sqlContext) :: Nil
156+
planLater(left), planLater(right), joinType, condition)(sqlContext) :: Nil
160157
case _ => Nil
161158
}
162159
}

0 commit comments

Comments
 (0)