MaxGekk commented on code in PR #10630:
URL: https://github.com/apache/spark/pull/10630#discussion_r1243340303


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -214,12 +214,22 @@ trait CheckAnalysis {
               s"""Only a single table generating function is allowed in a 
SELECT clause, found:
                  | ${exprs.map(_.prettyString).mkString(",")}""".stripMargin)
 
-          // Special handling for cases when self-join introduce duplicate 
expression ids.
-          case j @ Join(left, right, _, _) if 
left.outputSet.intersect(right.outputSet).nonEmpty =>
-            val conflictingAttributes = 
left.outputSet.intersect(right.outputSet)
+          case j: Join if !j.duplicateResolved =>
+            val conflictingAttributes = 
j.left.outputSet.intersect(j.right.outputSet)
             failAnalysis(
               s"""
-                 |Failure when resolving conflicting references in Join:

Review Comment:
   Can users observe the error? or it can be considered as an internal errors? 
BTW, we are about to convert it to an internal error in the PR: 
https://github.com/apache/spark/pull/41476



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

To unsubscribe, e-mail: [email protected]

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