LantaoJin commented on a change in pull request #28947:
URL: https://github.com/apache/spark/pull/28947#discussion_r448355216



##########
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:
       > Can we make it more general? It seems like we can optimize any SMJ if 
its 2 children are both shuffle stages. cc @JkSelf @maryannxue
   
   Yes. we usually implemented some optimizations based on our inner usages and 
issues. So it may be not general. I only see the UNION case so far.




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

Reply via email to