You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/01 01:31:18 UTC

[GitHub] [spark] ulysses-you commented on a change in pull request #32012: [SPARK-34919][SQL] Change partitioning to SinglePartition if partition number is 1

ulysses-you commented on a change in pull request #32012:
URL: https://github.com/apache/spark/pull/32012#discussion_r605320366



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala
##########
@@ -168,7 +168,7 @@ class SQLMetricsSuite extends SharedSparkSession with SQLMetricsTestUtils
     //           Exchange(nodeId = 5)
     //             LocalTableScan(nodeId = 6)
     Seq(true, false).foreach { enableWholeStage =>
-      val df = generateRandomBytesDF().repartition(1).groupBy('a).count()
+      val df = generateRandomBytesDF().repartition(2).groupBy('a).count()

Review comment:
       `repartition(1)` + `groupBy ` will eliminate the agg required exchange since `SinglePartition` can satisfies with all `Distribution` (exclude broadcast). So there change to `repartition(2)`.




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org