allisonwang-db commented on a change in pull request #34402:
URL: https://github.com/apache/spark/pull/34402#discussion_r743992678



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -687,10 +687,10 @@ trait CheckAnalysis extends PredicateHelper with 
LookupCatalog {
 
       case inSubqueryOrExistsSubquery =>
         plan match {
-          case _: Filter | _: SupportsSubquery | _: Join => // Ok
+          case _: SupportsSubquery | _: Join | _: UnaryNode => // Ok

Review comment:
       I think it's safer to use a whitelist of nodes than to support all 
UnaryNodes, and it shouldn't be a common use case for EXISTS/IN subquery to be 
in Generate, Expand, Limit, etc. We can always add more nodes in the future if 
needed.




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