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

    https://github.com/apache/spark/pull/21802#discussion_r204270437
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
 ---
    @@ -1184,6 +1186,137 @@ case class ArraySort(child: Expression) extends 
UnaryExpression with ArraySortLi
       override def prettyName: String = "array_sort"
     }
     
    +/**
    + * Returns a random permutation of the given array.
    + *
    + * This implementation uses the modern version of Fisher-Yates algorithm.
    + * Reference: 
https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modern_method
    --- End diff --
    
    In the latest commit, "inside-out" looks simpler without swapping (using 
just an assignment).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to