cloud-fan commented on a change in pull request #33191:
URL: https://github.com/apache/spark/pull/33191#discussion_r665660664



##########
File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/PruneFileSourcePartitionsSuite.scala
##########
@@ -109,9 +110,32 @@ class PruneFileSourcePartitionsSuite extends 
PrunePartitionSuiteBase {
     }
   }
 
+  test("SPARK-35985 push filters for empty read schema") {
+    // Force datasource v2 for parquet
+    withSQLConf((SQLConf.USE_V1_SOURCE_LIST.key, "")) {
+      withTempPath { dir =>
+        spark.range(10).selectExpr("id", "id % 3 as p")
+          .write.partitionBy("p").parquet(dir.getCanonicalPath)
+        val tbl = spark.read.parquet(dir.getCanonicalPath)
+        checkPartitionFilterUsed(tbl.where("p = 0").select(count("*")))

Review comment:
       can we use `assertPrunedPartitions` defined in `PrunePartitionSuiteBase`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to