You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/12/09 13:12:22 UTC

[GitHub] [spark] zhengruifeng commented on pull request #34850: [SPARK-37597][WIP] Deduplicate the right side of left-semi join and left-anti join

zhengruifeng commented on pull request #34850:
URL: https://github.com/apache/spark/pull/34850#issuecomment-989840218


   test case:
   
   ```
   spark.range(0, 10000, 1, 10).selectExpr("id % 1000 as key1", "id % 3 as value1").createOrReplaceTempView("table1")
   
   spark.range(0, 10000000, 1, 10).selectExpr("id % 100 as key2", "id as value2").createOrReplaceTempView("table2")
   
   spark.sql("SELECT key1 FROM table1 LEFT ANTI JOIN table2 ON key1 = key2").write.mode("overwrite").parquet("/tmp/tmp1.parquet")
   
   ```
   
   master:
   ```
   == Physical Plan ==
   Execute InsertIntoHadoopFsRelationCommand (22)
   +- AdaptiveSparkPlan (21)
      +- == Final Plan ==
         * Project (14)
         +- * SortMergeJoin LeftAnti (13)
            :- * Sort (5)
            :  +- AQEShuffleRead (4)
            :     +- ShuffleQueryStage (3)
            :        +- Exchange (2)
            :           +- * Range (1)
            +- * Sort (12)
               +- AQEShuffleRead (11)
                  +- ShuffleQueryStage (10)
                     +- Exchange (9)
                        +- * Project (8)
                           +- * Filter (7)
                              +- * Range (6)
   
   
   
   ```
   
   
   
   this pr:
   ```
   == Physical Plan ==
   Execute InsertIntoHadoopFsRelationCommand (25)
   +- AdaptiveSparkPlan (24)
      +- == Final Plan ==
         * Project (16)
         +- * BroadcastHashJoin LeftAnti BuildRight (15)
            :- AQEShuffleRead (4)
            :  +- ShuffleQueryStage (3)
            :     +- Exchange (2)
            :        +- * Range (1)
            +- BroadcastQueryStage (14)
               +- BroadcastExchange (13)
                  +- * HashAggregate (12)
                     +- AQEShuffleRead (11)
                        +- ShuffleQueryStage (10)
                           +- Exchange (9)
                              +- * HashAggregate (8)
                                 +- * Project (7)
                                    +- * Filter (6)
                                       +- * Range (5)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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