Github user gengliangwang commented on a diff in the pull request: https://github.com/apache/spark/pull/22390#discussion_r216739580 --- 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 -- I think it should be ``` case a And b if Not(a).semanticEquals(b) || a.semanticEquals(Not(b)) => if (!a.nullable && !b.nullable) { FalseLiteral } else if(a.nullable) { If(IsNull(a), Literal.create(null, a.dataType), FalseLiteral) } else { If(IsNull(b), Literal.create(null, a.dataType), FalseLiteral) } ```
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org