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

    https://github.com/apache/spark/pull/19257#discussion_r153343928
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/sources/BucketedReadSuite.scala ---
    @@ -602,6 +602,28 @@ abstract class BucketedReadSuite extends QueryTest 
with SQLTestUtils {
         )
       }
     
    +  test("SPARK-22042 ReorderJoinPredicates can break when child's 
partitioning is not decided") {
    +    withTable("bucketed_table", "table1", "table2") {
    +      df.write.format("parquet").saveAsTable("table1")
    +      df.write.format("parquet").saveAsTable("table2")
    +      df.write.format("parquet").bucketBy(8, "j", 
"k").saveAsTable("bucketed_table")
    +
    +      withSQLConf(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "0") {
    +        sql("""
    +              |SELECT *
    +              |FROM (
    +              |  SELECT a.i, a.j, a.k
    +              |  FROM bucketed_table a
    +              |  JOIN table1 b
    +              |  ON a.i = b.i
    +              |) c
    +              |JOIN table2
    +              |ON c.i = table2.i
    +              |""".stripMargin).explain()
    --- End diff --
    
    changed


---

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

Reply via email to