Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21386#discussion_r192214008
  
    --- 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 {
    +
    +  override def nullable: Boolean = true
    --- End diff --
    
    `child.nullable`?
    We don't need to override this in that case because it's the same in 
`UnaryExpression`.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to