cloud-fan commented on code in PR #37625: URL: https://github.com/apache/spark/pull/37625#discussion_r972659580
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala: ########## @@ -412,6 +412,16 @@ object BooleanSimplification extends Rule[LogicalPlan] with PredicateHelper { } } + case Or(EqualTo(l, r), And(IsNull(c1), IsNull(c2))) Review Comment: Assume that we have a chain of predicates combined by OR `cond1 OR cond2 OR cond3 OR ... condN`. I think we can merge `condX` and `condY` if they are `EqualTo(l, r)` and `And(IsNull(l), isNull(r))`. This is more general than the current approach. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org