Github user adrian-ionescu commented on a diff in the pull request: https://github.com/apache/spark/pull/22390#discussion_r216587787 --- 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 --- End diff -- While you're at it, isn't this also an issue? ``` Seq(false, true).toDF("b") .withColumn("b_or_null", 'b || lit(null)) .withColumn("null_or_b", lit(null) || 'b) .withColumn("b_and_null", 'b && lit(null)) .withColumn("null_and_b", lit(null) && 'b).show +-----+---------+---------+----------+----------+ | b|b_or_null|null_or_b|b_and_null|null_and_b| +-----+---------+---------+----------+----------+ |false| null| null| false| false| | true| true| true| null| null| +-----+---------+---------+----------+----------+ ```
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org