Skip to content

Commit a92ed0c

Browse files
committed
Formatting.
1 parent 76ca434 commit a92ed0c

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

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

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,36 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
3434
*/
3535
object HashJoin extends Strategy with PredicateHelper {
3636
var broadcastTables: Seq[String] =
37-
sparkContext.conf.get("spark.sql.hints.broadcastTables", "").split(",")
37+
sparkContext.conf.get("spark.sql.hints.broadcastTables", "").split(",").toBuffer
3838

3939
def apply(plan: LogicalPlan): Seq[SparkPlan] = plan match {
4040

41-
case HashFilteredJoin(Inner, leftKeys, rightKeys, condition,
42-
left, PhysicalOperation(_, _, b: BaseRelation)) if broadcastTables.contains(b.tableName)=>
41+
case HashFilteredJoin(
42+
Inner,
43+
leftKeys,
44+
rightKeys,
45+
condition,
46+
left,
47+
right @ PhysicalOperation(_, _, b: BaseRelation))
48+
if broadcastTables.contains(b.tableName)=>
49+
4350
val hashJoin =
4451
execution.BroadcastHashJoin(
45-
leftKeys, rightKeys, BuildRight, planLater(left), planLater(b))(sparkContext)
52+
leftKeys, rightKeys, BuildRight, planLater(left), planLater(right))(sparkContext)
4653
condition.map(Filter(_, hashJoin)).getOrElse(hashJoin) :: Nil
4754

48-
case HashFilteredJoin(Inner, leftKeys, rightKeys, condition,
49-
PhysicalOperation(_, _, b: BaseRelation), right) if broadcastTables.contains(b.tableName)=>
55+
case HashFilteredJoin(
56+
Inner,
57+
leftKeys,
58+
rightKeys,
59+
condition,
60+
left @ PhysicalOperation(_, _, b: BaseRelation),
61+
right)
62+
if broadcastTables.contains(b.tableName) =>
63+
5064
val hashJoin =
5165
execution.BroadcastHashJoin(
52-
leftKeys, rightKeys, BuildLeft, planLater(b), planLater(right))(sparkContext)
66+
leftKeys, rightKeys, BuildLeft, planLater(left), planLater(right))(sparkContext)
5367
condition.map(Filter(_, hashJoin)).getOrElse(hashJoin) :: Nil
5468

5569
case HashFilteredJoin(Inner, leftKeys, rightKeys, condition, left, right) =>

0 commit comments

Comments
 (0)