GitHub user sameeragarwal opened a pull request:
https://github.com/apache/spark/pull/17751
[SPARK-20451] Filter out nested mapType datatypes from sort order in
randomSplit
## What changes were proposed in this pull request?
In `randomSplit`, It is possible that the underlying dataset 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, as part of SPARK-12662, we explicitly sort each input
partition to make the ordering deterministic. Given that `MapTypes` cannot be
sorted this patch explicitly prunes them out from the sort order. Additionally,
if the resulting sort order is empty, this patch then materializes the dataset
to guarantee determinism.
## How was this patch tested?
Extended `randomSplit on reordered partitions` in `DataFrameStatSuite` to
also test for dataframes with mapTypes nested mapTypes.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sameeragarwal/spark randomsplit2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/17751.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17751
----
----
---
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]