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 2020/11/17 06:13:36 UTC

[GitHub] [spark] viirya commented on a change in pull request #30392: [SPARK-33465][CORE] RDD.takeOrdered should get rid of usage of reduce or use treeReduce instead

viirya commented on a change in pull request #30392:
URL: https://github.com/apache/spark/pull/30392#discussion_r524906076



##########
File path: core/src/main/scala/org/apache/spark/rdd/RDD.scala
##########
@@ -1521,7 +1521,7 @@ abstract class RDD[T: ClassTag](
       if (mapRDDs.partitions.length == 0) {
         Array.empty
       } else {
-        mapRDDs.reduce { (queue1, queue2) =>
+        mapRDDs.treeReduce { (queue1, queue2) =>

Review comment:
       I'm not sure if I miss anything, but this looks makes more sense based on the reason in the PR description. 




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