Description
`OptimizeSkewedJoin` rule will take effect only when the plan has two ShuffleQueryStageExec。
With `Union`, it might break the assumption. For example, the following plans
scenes 1
Union SMJ ShuffleQueryStage ShuffleQueryStage SMJ ShuffleQueryStage ShuffleQueryStage
scenes 2
Union SMJ ShuffleQueryStage ShuffleQueryStage HashAggregate
when one or more of the SMJ data in the above plan is skewed, it cannot be processed at present.
It's better to support partial optimize with Union.