JkSelf commented on a change in pull request #32781:
URL: https://github.com/apache/spark/pull/32781#discussion_r648082801
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -1782,4 +1782,36 @@ class AdaptiveQueryExecSuite
}
}
}
+
+ test("Coalesce number of partitions by AEQ") {
Review comment:
`test("SPARK-35650: Coalesce number of partitions by AEQ")`
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -1782,4 +1782,36 @@ class AdaptiveQueryExecSuite
}
}
}
+
+ test("Coalesce number of partitions by AEQ") {
+ withSQLConf(SQLConf.COALESCE_PARTITIONS_MIN_PARTITION_NUM.key -> "1") {
+ val query = "SELECT /*+ REPARTITION */ * FROM testData"
+ val (_, adaptivePlan) = runAdaptiveAndVerifyResult(query)
+ collect(adaptivePlan) {
+ case r: CustomShuffleReaderExec => r
+ } match {
+ case Seq(customShuffleReader) =>
+ assert(customShuffleReader.partitionSpecs.size === 1)
+ assert(!customShuffleReader.isLocalReader)
+ case _ =>
+ fail("There should be a CustomShuffleReaderExec")
+ }
+ }
+ }
+
+ test("Use local shuffle reader if can not coalesce number of partitions") {
Review comment:
test("SPARK-35650: Use local shuffle reader if can not coalesce number
of partitions")
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]