GitHub user pkuwm opened a pull request:
https://github.com/apache/spark/pull/21386
[SPARK-23928][SQL][WIP] Add shuffle collection function.
## What changes were proposed in this pull request?
This PR adds a new collection function: shuffle. It generates a random
permutation of the given array. This implementation uses the modern version of
Fisher-Yates algorithm.
## How was this patch tested?
New tests are added to CollectionExpressionsSuite.scala and
DataFrameFunctionsSuite.scala.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/pkuwm/spark SPARK-23928
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/21386.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 #21386
----
commit 6065dbe43fbace3cb257c055c3f391d6f6b68cfc
Author: pkuwm <ihuizhi.lu@...>
Date: 2018-05-21T20:50:15Z
[SPARK-23928][SQL] Add shuffle collection function.
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]