Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19714#discussion_r153098067
  
    --- 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 --
    
    Instead of doing `match`, can you just try to call `collect` and  assert 
the result is 1?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to