jayzhan211 commented on code in PR #8279:
URL: https://github.com/apache/arrow-datafusion/pull/8279#discussion_r1400457497


##########
docs/source/user-guide/sql/scalar_functions.md:
##########
@@ -1609,6 +1611,38 @@ array_append(array, element)
 - list_append
 - list_push_back
 
+### `array_sort`
+
+Sort array.
+
+```
+array_sort(array)
+array_sort(array, false)

Review Comment:
   asc, desc



##########
datafusion/sqllogictest/test_files/array.slt:
##########
@@ -1044,6 +1044,25 @@ select make_array(['a','b'], null);
 ----
 [[a, b], ]
 
+## array_sort (aliases: `list_sort`)
+query ???
+select array_sort(make_array(1, 3, null, 5, NULL, -5)), 
array_sort(make_array(1, 3, null, 2), 'ASC'), array_sort(make_array(1, 3, null, 
2), 'desc', 'NULLS FIRST');
+----
+[, , -5, 1, 3, 5] [, 1, 2, 3] [, 3, 2, 1]
+
+query ?
+select array_sort(make_array(a,d,e), 'DESC', 'NULLS LAST') from values;

Review Comment:
   Should  `from values`  be removed?



-- 
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.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to