Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/511#discussion_r11930428
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala ---
@@ -176,11 +176,15 @@ abstract class SparkStrategies extends
QueryPlanner[SparkPlan] {
case logical.InsertIntoTable(table: ParquetRelation, partition,
child, overwrite) =>
InsertIntoParquetTable(table, planLater(child),
overwrite)(sparkContext) :: Nil
case PhysicalOperation(projectList, filters, relation:
ParquetRelation) =>
- // TODO: Should be pushing down filters as well.
- pruneFilterProject(
- projectList,
- filters,
- ParquetTableScan(_, relation, None)(sparkContext)) :: Nil
+ // Note: we do not actually remove the filters that were pushed
down to Parquet from
+ // the plan, in case that some of the predicates cannot be
evaluated there because
+ // they contain complex operations, such as CASTs.
+ // TODO: rethink whether conjuntions that are handed down to
Parquet should be removed
--- End diff --
How hard would it be to move the logic that determines what filters can be
pushed down here, into the planner, so that we can avoid the double evaluation?
---
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.
---