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

    https://github.com/apache/spark/pull/16581#discussion_r96111124
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
    @@ -86,6 +86,19 @@ trait PredicateHelper {
        */
       protected def canEvaluate(expr: Expression, plan: LogicalPlan): Boolean =
         expr.references.subsetOf(plan.outputSet)
    +
    +  /**
    +   * Returns true iff `expr` could be evaluated as a condition within join.
    +   */
    +  protected def canEvaluateWithinJoin(expr: Expression): Boolean = {
    +    expr.find {
    +      case e: SubqueryExpression =>
    +        // non-correlated subquery will be replaced as literal
    +        e.children.nonEmpty
    +      case e: Unevaluable => true
    --- End diff --
    
    we need more documentation here on why should be considered evaluable as a 
join condition.
    
    for example, just looking at this code i have no idea why Uneavaluable is 
evaluable.



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to