You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/01 09:26:21 UTC

[GitHub] [spark] mgaido91 commented on a change in pull request #24495: [SPARK-27604][SQL] Enhance constant propagation to constraint propagation

mgaido91 commented on a change in pull request #24495: [SPARK-27604][SQL] Enhance constant propagation to constraint propagation
URL: https://github.com/apache/spark/pull/24495#discussion_r280033097
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
 ##########
 @@ -389,6 +313,7 @@ object SimplifyBinaryComparison extends Rule[LogicalPlan] with PredicateHelper {
     case q: LogicalPlan => q transformExpressionsUp {
       // True with equality
       case a EqualNullSafe b if a.semanticEquals(b) => TrueLiteral
+      case a EqualNullSafe b if a.foldable || b.foldable => EqualTo(a, b)
 
 Review comment:
   why do we need this? what if a or b are nullable?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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