sunchao commented on a change in pull request #33564:
URL: https://github.com/apache/spark/pull/33564#discussion_r679516263



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/PruneFileSourcePartitionsSuite.scala
##########
@@ -116,7 +107,7 @@ class PruneFileSourcePartitionsSuite extends 
PrunePartitionSuiteBase {
     // Force datasource v2 for parquet
     withSQLConf((SQLConf.USE_V1_SOURCE_LIST.key, "")) {
       withTempPath { dir =>
-        spark.range(10).selectExpr("id", "id % 3 as p")
+        spark.range(10).coalesce(1).selectExpr("id", "id % 3 as p")

Review comment:
       @viirya @huaxingao this is because `TestHiveSingleton` uses `local[1]` 
while `SharedSparkSession` uses `local[2]` so it will generate 2 Parquet files. 
As result, `ParquetScan` will generate 2 input splits which makes the test fail 
since the provided value for `expectedPartitionCount` is 1.




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