Github user nsyca commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17491#discussion_r109192716
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
    @@ -90,11 +90,12 @@ trait PredicateHelper {
        * Returns true iff `expr` could be evaluated as a condition within join.
        */
       protected def canEvaluateWithinJoin(expr: Expression): Boolean = expr 
match {
    -    case l: ListQuery =>
    +    case _: ListQuery | _: Exists =>
           // A ListQuery defines the query which we want to search in an IN 
subquery expression.
           // Currently the only way to evaluate an IN subquery is to convert 
it to a
           // LeftSemi/LeftAnti/ExistenceJoin by `RewritePredicateSubquery` 
rule.
           // It cannot be evaluated as part of a Join operator.
    +      // An Exists shouldn't be push into a Join operator too.
    --- End diff --
    
    I am not sure. The name of this is `def canEvaluateWithinJoin` so I assume 
it asks whether an input `Expression` can be processed as part of a Join 
operator. Can a `ScalarSubquery` be processed inside a Join?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to