viirya commented on a change in pull request #32179:
URL: https://github.com/apache/spark/pull/32179#discussion_r614336865



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -939,10 +939,16 @@ trait CheckAnalysis extends PredicateHelper with 
LookupCatalog {
       }
     }
 
+    def containsAttribute(e: Expression): Boolean = {
+      e.find(_.isInstanceOf[Attribute]).isDefined
+    }
+
     // Given a correlated predicate, check if it is either a non-equality 
predicate or
     // equality predicate that does not guarantee one-on-one mapping between 
inner and
-    // outer attributes. E.G.:
+    // outer attributes. When the correlated predicate does not contain any 
attribute
+    // (i.e. only has outer references), it is supported and should return 
false. E.G.:
     //   (a = outer(c)) -> false
+    //   (outer(c) = outer(d)) -> false

Review comment:
       do we have test case for it?




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