Github user sameeragarwal commented on a diff in the pull request:
https://github.com/apache/spark/pull/10626#discussion_r49044814
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala ---
@@ -1062,10 +1062,17 @@ class DataFrame private[sql](
* @since 1.4.0
*/
def randomSplit(weights: Array[Double], seed: Long): Array[DataFrame] = {
+ // It is possible that the underlying dataframe doesn't guarantee the
ordering of rows in its
+ // constituent partitions each time a split is materialized which
could result in
+ // overlapping splits. To prevent this, we explicitly sort each input
partition to make the
+ // ordering deterministic.
+ val logicalPlanWithLocalSort =
--- End diff --
done
---
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]