jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1967573526
########## 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: After removing this, array_sort(null) fail. What you need to do is to return DataType::List(Int32) in `array_valid_types`, i32 as the default type. Then you can get something like `ListArray[null]` as ArrayRef in `array_sort_inner`, this is null with datatype list. After that we can handle null case in `array_sort_inner` with returning it directly -- 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