Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/8515#issuecomment-135988407
  
    Would be nice to have the following test case in 
`ParquetHadoopFsRelationSuite`:
    
    ```scala
      test("SPARK-10334 Projections and filters should be kept in physical 
plan") {
        withTempPath { dir =>
          val path = dir.getCanonicalPath
    
          sqlContext.range(2).select('id as 'a, 'id as 
'b).write.partitionBy("b").parquet(path)
          val df = sqlContext.read.parquet(path).filter('a === 0).select('b)
          val physicalPlan = df.queryExecution.executedPlan
    
          assert(physicalPlan.collect { case p: execution.Project => p }.length 
=== 1)
          assert(physicalPlan.collect { case p: execution.Filter => p }.length 
=== 1)
        }
      }
    ```
    
    And probably add `[SPARK-10301]` in the PR title, since this PR also 
delivers a quick fix for it.
    
    Otherwise LGTM. Verified locally that filter push-down and column pruning 
both work properly.


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

Reply via email to