GitHub user viirya opened a pull request: https://github.com/apache/spark/pull/11676
[SPARK-XXX][SQL] Defer input evaluation and fix Cast issue in IsNotNull filtering for Filter codegen ## What changes were proposed in this pull request? This PR improves Filter codegen by: 1. After #11585, we filter out the rows early if it have null value. So we can only evaluate the inputs used in these filtering before this plan. The evaluation of other inputs can be deferred after the filtering done. 2. Currently we check `IsNotNull(a)` to find the attributes needed to filter out null values. However, the expression `IsNotNull(Cast(a, dt))` will not be checked by this. We should add pattern to find this. ## How was this patch tested? Existing tests. You can merge this pull request into a Git repository by running: $ git pull https://github.com/viirya/spark-1 improve-filter-codegen Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/11676.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #11676 ---- commit b9058639a44aafad9d5a2f64b78a3f1b8d5ca41b Author: Liang-Chi Hsieh <sim...@tw.ibm.com> Date: 2016-03-12T09:06:43Z Defer input evaluation and fix Cast issue in IsNotNull filtering. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org