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 2019/05/21 06:27:07 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #24344: [SPARK-27440][SQL] Optimize uncorrelated predicate subquery

cloud-fan commented on a change in pull request #24344: [SPARK-27440][SQL] Optimize uncorrelated predicate subquery
URL: https://github.com/apache/spark/pull/24344#discussion_r285867101
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala
 ##########
 @@ -93,6 +93,21 @@ object SubqueryExpression {
     }.isDefined
   }
 
+  /**
+   * Returns true when an expression contains a correlated IN or correlated EXISTS and
+   * false otherwise. An IN is non-correlated only if the left values are foldable
+   * and the subquery has no outer references.
+   */
+  def hasCorrelatedInOrExists(e: Expression): Boolean = {
 
 Review comment:
   a general question: what's the difference between this and `hasCorrelatedSubquery`? It seems to me that `In` or `Exists` are subqueries, so `hasCorrelatedSubquery` should cover 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:
users@infra.apache.org


With regards,
Apache Git Services

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