Liulietong opened a new pull request #34602:
URL: https://github.com/apache/spark/pull/34602


   
   ### What changes were proposed in this pull request?
   Fix the issue that OptimizeSkewedJoin may not work.
   Since OptimizeSkewedJoin was moved from `queryStageOptimizerRules` to 
`queryStagePreparationRules,` the position OptimizeSkewedJoin was applied has 
been moved from `newQueryStage()` to `reOptimize()`. The plan 
OptimizeSkewedJoin applied on changed from plan of new stage which is about to 
submit to whole spark plan.
   In the cases where skewedJoin is not last stage, OptimizeSkewedJoin may not 
work because the number of collected shuffleStages is more than 2.
   
   
   ### Why are the changes needed?
   Bug fix.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   New test.
   


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