manuzhang edited a comment on pull request #29797:
URL: https://github.com/apache/spark/pull/29797#issuecomment-726493708


   @maryannxue This could miss a LSR optimization on ~~build~~ probe side of 
leaf BHJ in multiple joins as follows.
   
   ```
   *(6) BroadcastHashJoin [b#24], [a#33], Inner, BuildLeft, false
   :- BroadcastQueryStage 7
   :  +- BroadcastExchange HashedRelationBroadcastMode(List(cast(input[3, int, 
false] as bigint)),false), [id=#390]
   :     +- CustomShuffleReader local
   :        +- ShuffleQueryStage 6
   :           +- Exchange hashpartitioning(b#24, 5), true, [id=#364]
   :              +- *(5) BroadcastHashJoin [key#13], [a#23], Inner, BuildLeft, 
false
   :                 :- BroadcastQueryStage 4
   :                 :  +- BroadcastExchange 
HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), 
[id=#264]
   :                 :     +- CustomShuffleReader local
   :                 :        +- ShuffleQueryStage 0
   :                 :           +- Exchange hashpartitioning(key#13, 5), true, 
[id=#172]
   :                 :              +- *(1) Filter (isnotnull(value#14) AND 
(cast(value#14 as int) = 1))
   :                 :                 +- *(1) SerializeFromObject 
[knownnotnull(assertnotnull(input[0, 
org.apache.spark.sql.test.SQLTestData$TestData, true])).key AS key#13, 
staticinvoke(class org.apache.spark.unsafe.types.UTF8String, StringType, 
fromString, knownnotnull(assertnotnull(input[0, 
org.apache.spark.sql.test.SQLTestData$TestData, true])).value, true, false) AS 
value#14]
   :                 :                    +- Scan[obj#12]
   :                 +- ShuffleQueryStage 1
   :                    +- Exchange hashpartitioning(a#23, 5), true, [id=#179]
   :                       +- *(2) Filter (b#24 = 1)
   :                          +- *(2) SerializeFromObject 
[knownnotnull(assertnotnull(input[0, 
org.apache.spark.sql.test.SQLTestData$TestData2, true])).a AS a#23, 
knownnotnull(assertnotnull(input[0, 
org.apache.spark.sql.test.SQLTestData$TestData2, true])).b AS b#24]
   :                             +- Scan[obj#22]
   +- *(6) BroadcastHashJoin [n#93], [a#33], Inner, BuildRight, false
      :- CustomShuffleReader local
      :  +- ShuffleQueryStage 2
      :     +- Exchange hashpartitioning(n#93, 5), true, [id=#196]
      :        +- *(3) Filter (n#93 = 1)
      :           +- *(3) SerializeFromObject 
[knownnotnull(assertnotnull(input[0, 
org.apache.spark.sql.test.SQLTestData$LowerCaseData, true])).n AS n#93, 
staticinvoke(class org.apache.spark.unsafe.types.UTF8String, StringType, 
fromString, knownnotnull(assertnotnull(input[0, 
org.apache.spark.sql.test.SQLTestData$LowerCaseData, true])).l, true, false) AS 
l#94]
      :              +- Scan[obj#92]
      +- BroadcastQueryStage 5
         +- BroadcastExchange HashedRelationBroadcastMode(List(cast(input[0, 
int, false] as bigint)),false), [id=#310]
            +- CustomShuffleReader local
               +- ShuffleQueryStage 3
                  +- Exchange hashpartitioning(a#33, 5), true, [id=#210]
                     +- *(4) Filter (a#33 = 1)
                        +- *(4) SerializeFromObject 
[knownnotnull(assertnotnull(input[0, 
org.apache.spark.sql.test.SQLTestData$TestData3, true])).a AS a#33, 
unwrapoption(IntegerType, knownnotnull(assertnotnull(input[0, 
org.apache.spark.sql.test.SQLTestData$TestData3, true])).b) AS b#34]
                           +- Scan[obj#32]
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to