Github user pkuwm commented on a diff in the pull request:
https://github.com/apache/spark/pull/21386#discussion_r192255069
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
---
@@ -555,6 +557,100 @@ case class ArraySort(child: Expression) extends
UnaryExpression with ArraySortLi
override def prettyName: String = "array_sort"
}
+
+/**
+ * Returns a random permutation of the given array..
+ */
+@ExpressionDescription(
+ usage = "_FUNC_(array) - Returns a random permutation of the given
array.",
+ examples = """
+ Examples:
+ > SELECT _FUNC_(array(1, 20, 3, 5));
+ [3, 1, 5, 20]
+ > SELECT _FUNC_(array(1, 20, null, 3));
+ [20, null, 3, 1]
+ """, since = "2.4.0")
+case class Shuffle(child: Expression) extends UnaryExpression with
ImplicitCastInputTypes {
--- End diff --
Thanks a lot, Takuya @ueshin ! This is a good tip! Working on it and will
push a new commit.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]