@@ -96,6 +96,16 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
9696 case ExtractEquiJoinKeys (Inner , leftKeys, rightKeys, condition, CanBroadcast (left), right) =>
9797 makeBroadcastHashJoin(leftKeys, rightKeys, left, right, condition, joins.BuildLeft )
9898
99+ case ExtractEquiJoinKeys (
100+ LeftOuter , leftKeys, rightKeys, condition, left, CanBroadcast (right)) =>
101+ joins.BroadcastHashOuterJoin (
102+ leftKeys, rightKeys, LeftOuter , condition, planLater(left), planLater(right)) :: Nil
103+
104+ case ExtractEquiJoinKeys (
105+ RightOuter , leftKeys, rightKeys, condition, CanBroadcast (left), right) =>
106+ joins.BroadcastHashOuterJoin (
107+ leftKeys, rightKeys, RightOuter , condition, planLater(left), planLater(right)) :: Nil
108+
99109 // If the sort merge join option is set, we want to use sort merge join prior to hashjoin.
100110 // And for outer join, we can not put conditions outside of the join
101111 case ExtractEquiJoinKeys (joinType, leftKeys, rightKeys, condition, left, right)
@@ -114,16 +124,6 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
114124 leftKeys, rightKeys, buildSide, planLater(left), planLater(right))
115125 condition.map(Filter (_, hashJoin)).getOrElse(hashJoin) :: Nil
116126
117- case ExtractEquiJoinKeys (
118- LeftOuter , leftKeys, rightKeys, condition, left, CanBroadcast (right)) =>
119- joins.BroadcastHashOuterJoin (
120- leftKeys, rightKeys, LeftOuter , condition, planLater(left), planLater(right)) :: Nil
121-
122- case ExtractEquiJoinKeys (
123- RightOuter , leftKeys, rightKeys, condition, CanBroadcast (left), right) =>
124- joins.BroadcastHashOuterJoin (
125- leftKeys, rightKeys, RightOuter , condition, planLater(left), planLater(right)) :: Nil
126-
127127 case ExtractEquiJoinKeys (joinType, leftKeys, rightKeys, condition, left, right) =>
128128 joins.ShuffledHashOuterJoin (
129129 leftKeys, rightKeys, joinType, condition, planLater(left), planLater(right)) :: Nil
0 commit comments