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

    https://github.com/apache/spark/pull/16467#discussion_r94887839
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/subquery.scala
 ---
    @@ -68,8 +68,15 @@ object RewritePredicateSubquery extends 
Rule[LogicalPlan] with PredicateHelper {
               // Note that will almost certainly be planned as a Broadcast 
Nested Loop join.
               // Use EXISTS if performance matters to you.
               val (joinCond, outerPlan) = rewriteExistentialExpr(conditions, p)
    -          val anyNull = 
splitConjunctivePredicates(joinCond.get).map(IsNull).reduceLeft(Or)
    -          Join(outerPlan, sub, LeftAnti, Option(Or(anyNull, joinCond.get)))
    +          // Expand the NOT IN expression with the NULL-aware semantic
    +          // to its full form. That is from:
    +          //   (a1,b1,...) = (a2,b2,...)
    +          // to
    +          //   (a1=a2 OR isnull(a1=a2)) AND (b1=b2 OR isnull(b1=b2)) AND 
...
    +          val joinConds = splitConjunctivePredicates(joinCond.get)
    +          val isNulls = joinConds.map(IsNull)
    --- End diff --
    
    Thank you. I have changed the code.


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