Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14864#discussion_r78183670
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/JoinSuite.scala ---
    @@ -61,6 +62,51 @@ class JoinSuite extends QueryTest with SharedSQLContext {
         }
       }
     
    +  test("SPARK-15453 : Sort Merge join on bucketed + sorted tables should 
not add `sort` step " +
    +    "if the join predicates are subset of the sorted columns of the 
tables") {
    +    withTable("SPARK_15453_table_a", "SPARK_15453_table_b") {
    +      withSQLConf("spark.sql.autoBroadcastJoinThreshold" -> "0") {
    +        val df =
    +          (0 until 8)
    +            .map(i => (i, i * 2, i.toString))
    +            .toDF("i", "j", "k")
    +            .coalesce(1)
    +        df.write.bucketBy(4, "j", "k").sortBy("j", 
"k").saveAsTable("SPARK_15453_table_a")
    --- End diff --
    
    should we bucket the table by `i, j` and sort it by `j, k`? To reflect the 
test name `if the join predicates are subset of the sorted columns`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to