LantaoJin commented on a change in pull request #28947:
URL: https://github.com/apache/spark/pull/28947#discussion_r448352093
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeSkewedJoin.scala
##########
@@ -286,6 +283,36 @@ case class OptimizeSkewedJoin(conf: SQLConf) extends
Rule[SparkPlan] {
plan
}
}
+
+ override def apply(plan: SparkPlan): SparkPlan = {
+ if (!conf.getConf(SQLConf.SKEW_JOIN_ENABLED)) {
+ return plan
+ }
+
+ // Try to handle skew join with union case, like
Review comment:
> For 3-table join, if they are in the same query stage, it means the
shuffles are all leaf, and we will only optimize the first SMJ, as the second
SMJ has only one side as shuffle stage.
We have a 3-table skewed join implamentation in our internal code base. But
we have replaced the skew join handling logic by community's. So our
optimization is not work based on currnet `OptimizeSkewedJoin`. I will try to
re-implement it in current `OptimizeSkewedJoin` and submit a PR later.
----------------------------------------------------------------
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]