Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22390#discussion_r216575397
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
 ---
    @@ -263,10 +263,12 @@ object BooleanSimplification extends 
Rule[LogicalPlan] with PredicateHelper {
           case TrueLiteral Or _ => TrueLiteral
           case _ Or TrueLiteral => TrueLiteral
     
    -      case a And b if Not(a).semanticEquals(b) => FalseLiteral
    --- End diff --
    
    how about
    ```
    case a And b if Not(a).semanticEquals(b) || a.semanticEquals(Not(b)) =>
      If(IsNull(a), null, FalseLiteral)
    ```


---

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

Reply via email to