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



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -1026,15 +1026,48 @@ class AdaptiveQueryExecSuite
     Seq(true, false).foreach { enableAQE =>
       withSQLConf(
         SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> enableAQE.toString,
+        SQLConf.COALESCE_PARTITIONS_ENABLED.key -> "true",
         SQLConf.SHUFFLE_PARTITIONS.key -> "6",
         SQLConf.COALESCE_PARTITIONS_INITIAL_PARTITION_NUM.key -> "7") {
-        val partitionsNum = 
spark.range(10).repartition($"id").rdd.collectPartitions().length
+        val df = spark.range(10).repartition($"id")

Review comment:
       can we test `repartition(numPartitions)` in this test case and make sure 
the partition number doesn't change? You new test case already test repartition 
by key/range.

##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -1026,15 +1026,48 @@ class AdaptiveQueryExecSuite
     Seq(true, false).foreach { enableAQE =>
       withSQLConf(
         SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> enableAQE.toString,
+        SQLConf.COALESCE_PARTITIONS_ENABLED.key -> "true",
         SQLConf.SHUFFLE_PARTITIONS.key -> "6",
         SQLConf.COALESCE_PARTITIONS_INITIAL_PARTITION_NUM.key -> "7") {
-        val partitionsNum = 
spark.range(10).repartition($"id").rdd.collectPartitions().length
+        val df = spark.range(10).repartition($"id")

Review comment:
       can we test `repartition(numPartitions)` in this test case and make sure 
the partition number doesn't change? Your new test case already test 
repartition by key/range.




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

Reply via email to