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 07:02:26 UTC

[GitHub] [spark] peter-toth opened a new pull request #24553: [SPARK-27604][SQL] Enhance constant propagation

peter-toth opened a new pull request #24553: [SPARK-27604][SQL] Enhance constant propagation
URL: https://github.com/apache/spark/pull/24553
 
 
   ## What changes were proposed in this pull request?
   
   This PR improves `ConstantPropagation` rule by extending propagation from `attribute => constant` to `expression => constant` mapping and allows substituting deterministic expressions to constants in any expression. (Previously substitution of attributes only in `EqualTo` and `EqualNullSafe` was allowed).
   ```
   SELECT * FROM table WHERE abs(i) = 5 AND j <= abs(i) + 3  =>  ... WHERE abs(i) = 5 AND j <= 8
   ```
   
   ## How was this patch tested?
   
   Existing UTs.
   
   

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