advancedxy commented on pull request #34602:
URL: https://github.com/apache/spark/pull/34602#issuecomment-971322018
> `OptimizeSkewedJoin` is supposed to only handle materialized shuffle
stages, or did I miss something?
Hi @cloud-fan, `OptimizeSkewedJoin` is supposed to handle materialized
shuffle stages only. The problem is that for multiple joins like the following
```
ShuffledHashJoin1
-- Exchange
-- Project
-- ShuffledHashJoin0 (has skew)
-- ShuffleQueryStage0
-- ShuffleQueryStage1
-- ShuffleQueryStage2
```
The `ShuffledHashJoin0` has skew, and should be optimized by skew join rule.
However, after we move `OptimizeSkewedJoin` to `queryStagePreparationRules`,
`OptimizeSkewedJoin` takes the whole plan as input and detects that it has 3
shuffle query stages, which OptimizeSkewJoin doesn't support.
This is a regression of SPARK-33832
--
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]