Github user wangyum commented on a diff in the pull request:
https://github.com/apache/spark/pull/19714#discussion_r153401036
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/execution/joins/BroadcastJoinSuite.scala
---
@@ -223,4 +223,36 @@ class BroadcastJoinSuite extends QueryTest with
SQLTestUtils {
assert(HashJoin.rewriteKeyExpr(l :: ss :: Nil) === l :: ss :: Nil)
assert(HashJoin.rewriteKeyExpr(i :: ss :: Nil) === i :: ss :: Nil)
}
+
+ test("Shouldn't change broadcast join buildSide if user clearly
specified") {
+ spark.createDataFrame(Seq((1, "4"), (2, "2"))).toDF("key",
"value").createTempView("table1")
+ spark.createDataFrame(Seq((1, "1"), (2, "2"))).toDF("key",
"value").createTempView("table2")
+
+ def assertJoinBuildSide(pair: (String, BuildSide)): Any = {
+ val (sqlString, s) = pair
+ val df = sql(sqlString)
+ val physical = df.queryExecution.executedPlan
+ physical match {
--- End diff --
Just check the results in the absence of this patch is also successful.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]