You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/01 14:53:16 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #28695: [SPARK-28344][SQL][FOLLOW-UP] Check the ambiguous self-join only if there is a join in the plan

HyukjinKwon commented on a change in pull request #28695:
URL: https://github.com/apache/spark/pull/28695#discussion_r433282226



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/analysis/DetectAmbiguousSelfJoin.scala
##########
@@ -137,6 +137,9 @@ class DetectAmbiguousSelfJoin(conf: SQLConf) extends Rule[LogicalPlan] {
           }
           condition.toSeq.flatMap(getAmbiguousAttrs)
 
+        case _ if plan.find(_.isInstanceOf[Join]).isEmpty =>
+          Nil  // If there's no join, there's no self-join.

Review comment:
       Yes, we can. I wanted to make a minimised fix with running the metadata cleanup logic but maybe I was worried too much.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org