srowen commented on a change in pull request #25728: [SPARK-29020][SQL]
Improving array_sort behaviour
URL: https://github.com/apache/spark/pull/25728#discussion_r322765480
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -3328,13 +3328,23 @@ object functions {
}
/**
- * Sorts the input array in ascending order. The elements of the input array
must be orderable.
+ * Sorts the input array for the given column in ascending order,
+ * according to the natural ordering of the array elements.
* Null elements will be placed at the end of the returned array.
*
* @group collection_funcs
* @since 2.4.0
*/
- def array_sort(e: Column): Column = withExpr { ArraySort(e.expr) }
+ def array_sort(e: Column): Column = array_sort(e, asc = lit(true))
Review comment:
I think these would need to be added to Pyspark as well as R?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]