Github user jerryshao commented on a diff in the pull request:
https://github.com/apache/spark/pull/3438#discussion_r28222570
--- Diff: core/src/test/scala/org/apache/spark/rdd/RDDSuite.scala ---
@@ -726,8 +725,8 @@ class RDDSuite extends FunSuite with SharedSparkContext
{
val repartitioned =
data.repartitionAndSortWithinPartitions(partitioner)
val partitions = repartitioned.glom().collect()
- assert(partitions(0) === Seq((0, 5), (0, 8), (2, 6)))
- assert(partitions(1) === Seq((1, 3), (3, 8), (3, 8)))
+ assert(partitions(0).toSet === Set((0, 5), (0, 8), (2, 6)))
+ assert(partitions(1).toSet === Set((1, 3), (3, 8), (3, 8)))
--- End diff --
The original code will return `(0, 5), (0, 8), (2, 6)` and this PR will
return `(0, 8), (0, 5), (2, 6)`. I think they both follow the criteria of sort
based shuffle (keep the key ordering). Maybe the change is not so
straightforward, but it is correct from my understanding.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]