Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.35.0
Description
sort_array
sort_array(array[, ascendingOrder]) - Sorts the input array in ascending or descending order according to the natural ordering of the array elements. Null elements will be placed at the beginning of the returned array in ascending order or at the end of the returned array in descending order.
Examples:
> SELECT sort_array(array('b', 'd', null, 'c', 'a'), true);
{{ [null,"a","b","c","d"]}}
> SELECT sort_array(array('b', 'd', null, 'c', 'a'));
{{ [null,"a","b","c","d"]}}
Attachments
Issue Links
- links to