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/08 19:58:05 UTC

[GitHub] [spark] peter-toth commented on a change in pull request #24495: [SPARK-27604][SQL] Add filter reduction

peter-toth commented on a change in pull request #24495: [SPARK-27604][SQL] Add filter reduction
URL: https://github.com/apache/spark/pull/24495#discussion_r282224333
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
 ##########
 @@ -55,100 +55,24 @@ object ConstantFolding extends Rule[LogicalPlan] {
 }
 
 /**
- * Substitutes [[Attribute Attributes]] which can be statically evaluated with their corresponding
- * value in conjunctive [[Expression Expressions]]
+ * Substitutes expressions which can be statically narrowed by constrains.
  * eg.
  * {{{
- *   SELECT * FROM table WHERE i = 5 AND j = i + 3
- *   ==>  SELECT * FROM table WHERE i = 5 AND j = 8
+ *   SELECT * FROM table WHERE i = 5 AND j = i + 3     => SELECT * FROM table WHERE i = 5 AND j = 8
+ *   SELECT * FROM table WHERE i <= 5 AND i = 5        => SELECT * FROM table WHERE i = 5
 
 Review comment:
   I've moved all new logic to `FilterReduction` and extracted constant propagation enhancements to a separate PR.

----------------------------------------------------------------
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