Github user andreweduffy commented on a diff in the pull request: https://github.com/apache/spark/pull/15835#discussion_r87503167 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala --- @@ -703,6 +703,34 @@ class ParquetQuerySuite extends QueryTest with ParquetTest with SharedSQLContext } } } + + test("SPARK-17059: Allow FileFormat to specify partition pruning strategy") { + withSQLConf(ParquetOutputFormat.ENABLE_JOB_SUMMARY -> "true") { + withTempPath { path => + spark.sparkContext.parallelize(Seq(1, 2, 3), 3) + .toDF("x").write.parquet(path.getCanonicalPath) + + val zeroPartitions = spark.read.parquet(path.getCanonicalPath).where("x = 0") + assert(zeroPartitions.rdd.partitions.length == 0) + + val onePartition = spark.read.parquet(path.getCanonicalPath).where("x = 1") + assert(onePartition.rdd.partitions.length == 1) + } + } + } + + test("Do not filter out parquet file when missing in _metadata file") { --- End diff -- I'm not sure I understand what this test accomplishes. If you write out twice with summary metadata, why would anything be missing in `_metadata` file?
--- 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