GitHub user marmbrus opened a pull request:
https://github.com/apache/spark/pull/213
Unify the logic for column pruning, projection, and filtering of table
scans.
This removes a bunch of duplicated logic, dead code and casting when
planning parquet table scans and hive table scans.
Other changes:
- Fix tests now that we are doing a better job of column pruning (i.e.
since pruning predicates are applied before we even start scanning tuples,
columns required by these predicates do not need to be included unless they are
also included in the final output of this logical plan fragment.
- Add rule to simplify trivial filters. This was required to avoid `WHERE
false` from getting pushed into table scans, since `HiveTableScan` (reasonably)
refuses to apply partition pruning predicates to non-partitioned tables.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/marmbrus/spark strategyCleanup
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/213.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 #213
----
commit 0ae86cfcba56b700d8e7bd869379f0c663b21c1e
Author: Michael Armbrust <[email protected]>
Date: 2014-03-24T04:57:42Z
Unify the logic for column pruning, projection, and filtering of table
scans for both Hive and Parquet relations. Fix tests now that we are doing a
better job of column pruning.
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---