You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by maropu <gi...@git.apache.org> on 2017/11/22 02:35:04 UTC

[GitHub] spark pull request #19781: [SPARK-22445][SQL][FOLLOW-UP] Respect stream-side...

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

    https://github.com/apache/spark/pull/19781#discussion_r152455868
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/JoinSuite.scala ---
    @@ -857,4 +857,29 @@ class JoinSuite extends QueryTest with SharedSQLContext {
     
         joinQueries.foreach(assertJoinOrdering)
       }
    +
    +  test("SPARK-22445 Respect stream-side child's needCopyResult in BroadcastHashJoin") {
    +    val df1 = Seq((2, 3), (2, 5), (2, 2), (3, 8), (2, 1)).toDF("k", "v1")
    +    val df2 = Seq((2, 8), (3, 7), (3, 4), (1, 2)).toDF("k", "v2")
    +    val df3 = Seq((1, 1), (3, 2), (4, 3), (5, 1)).toDF("k", "v3")
    +
    +    withSQLConf(
    +        SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1",
    +        SQLConf.JOIN_REORDER_ENABLED.key -> "false") {
    +      val df = df1.join(df2, "k").join(functions.broadcast(df3), "k")
    +      val plan = df.queryExecution.sparkPlan
    +
    +      // Check if `needCopyResult` in `BroadcastHashJoin` is correct when smj->bhj
    --- End diff --
    
    `q6` also failed when smj->bhj


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org