GitHub user gatorsmile opened a pull request: https://github.com/apache/spark/pull/11682
[SPARK-13840] [SQL] Disable Project Pushdown Through Filter #### What changes were proposed in this pull request? Before this PR, two Optimizer rules `ColumnPruning` and `PushPredicateThroughProject` reverse each other's effects. Optimizer always reaches the max iteration when optimizing some queries. Thus, we need to disable `Project` push down through `Filter` in the rule `columnPruning`. The issue becomes worse when having another rule `NullFiltering`, which could add extra Filters for `IsNotNull`. We have to be careful when introducing extra `Filter` if the benefit is not large enough. cc @sameeragarwal @marmbrus In addition, `ColumnPruning` should not push `Project` through non-deterministic `Filter`. This could cause wrong results. cc @davies @cloud-fan @yhuai #### How was this patch tested? Modified the existing test cases. You can merge this pull request into a Git repository by running: $ git pull https://github.com/gatorsmile/spark viewDuplicateNames Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/11682.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 #11682 ---- commit e128a0a3d23b7a6a37cdc77034a651d79e32c451 Author: gatorsmile <gatorsm...@gmail.com> Date: 2016-03-13T02:00:04Z Disable Project Push Down Through Filter ---- --- 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