jayzhan211 commented on code in PR #14737:
URL: https://github.com/apache/datafusion/pull/14737#discussion_r1967507986


##########
datafusion/sqllogictest/test_files/array.slt:
##########
@@ -2235,36 +2235,43 @@ select array_sort(make_array(1, 3, null, 5, NULL, -5)), 
array_sort(make_array(1,
 ----
 [NULL, NULL, -5, 1, 3, 5] [NULL, 1, 2, 3] [NULL, 3, 2, 1]
 
-query ?
+query error

Review Comment:
   ```
   D insert into t values ([1,2,3]);
   D insert into t values ([1,3,2]);
   D insert into t values (null);
   D select array_sort(a) from t;
   ┌───────────────┐
   │ array_sort(a) │
   │    int32[]    │
   ├───────────────┤
   │ [1, 2, 3]     │
   │ [1, 2, 3]     │
   │               │
   └───────────────┘
   ```
   
   You can check the result from duckdb



##########
datafusion/functions-nested/src/sort.rs:
##########
@@ -143,6 +168,10 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> 
Result<ArrayRef> {
         return exec_err!("array_sort expects one to three arguments");
     }
 
+    if args.iter().any(|array| array.logical_null_count() > 0) {

Review Comment:
   so actually we should remove this line



-- 
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...@datafusion.apache.org

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


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

Reply via email to