LantaoJin opened a new pull request #28947:
URL: https://github.com/apache/spark/pull/28947


   ### What changes were proposed in this pull request?
   In the `apply` method of `OptimizeSkewedJoin`, we first match out the 
`UnionExec` nodes, then try to optimize their children with current logic.
   
   
   ### Why are the changes needed?
   Current, the AQE skew join only supports two tables join such as
   ```
   SMJ
   :-Sort
   :    +-Shuffle
   +-Sort
        +-Shuffle
   ```
   But if the plan contains a Union, the skew join handling not work:
   ```
   Union
   :-SMJ
   :   :-Sort
   :   :    +-Shuffle
   :   +-Sort
   :        +-Shuffle
   +-SMJ
   :   :-Sort
   :   :    +-Shuffle
   :   +-Sort
            +-Shuffle
   ```
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Add a UT.


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