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

    https://github.com/apache/spark/pull/21848#discussion_r204546087
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
 ---
    @@ -390,6 +390,7 @@ object SimplifyConditionals extends Rule[LogicalPlan] 
with PredicateHelper {
           case If(TrueLiteral, trueValue, _) => trueValue
           case If(FalseLiteral, _, falseValue) => falseValue
           case If(Literal(null, _), _, falseValue) => falseValue
    +      case If(_, trueValue, falseValue) if 
trueValue.semanticEquals(falseValue) => trueValue
    --- End diff --
    
    Good point.


---

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

Reply via email to