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. Now we have moved this part to community's. This optimization is not work base currnet `OptimizeSkewedJoin`. I think I could submit a PR later to ask more people to review. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org