jackylee-ch opened a new pull request, #44661:
URL: https://github.com/apache/spark/pull/44661

   ### What changes were proposed in this pull request?
   As outlined in JIRA issue 
[SPARK-46590](https://issues.apache.org/jira/browse/SPARK-46590), when a 
broadcast join follows a union within the same stage, the 
[collectCoalesceGroups](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CoalesceShufflePartitions.scala#L144)
 method will indiscriminately traverse all sub-plans, aggregating them into a 
single group, which is not expected.
   
   ### Why are the changes needed?
   In fact, for broadcastjoin, we do not expect broadcast exchange has same 
partition number. Therefore, we can safely disregard the broadcast join and 
continue traversing the subplan.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Newly added unit test. It would fail without this pr.
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No
   


-- 
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: [email protected]

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