comphead commented on code in PR #8622: URL: https://github.com/apache/arrow-datafusion/pull/8622#discussion_r1435266416
########## datafusion/physical-expr/src/array_expressions.rs: ########## @@ -1082,6 +1106,10 @@ fn concat_internal(args: &[ArrayRef]) -> Result<ArrayRef> { /// Array_concat/Array_cat SQL function pub fn array_concat(args: &[ArrayRef]) -> Result<ArrayRef> { + if args.is_empty() { + return exec_err!("array_concat expects at least one arguments"); Review Comment: ```suggestion return exec_err!("array_concat expects at least one argument"); ``` ########## datafusion/physical-expr/src/array_expressions.rs: ########## @@ -883,6 +899,10 @@ pub fn array_append(args: &[ArrayRef]) -> Result<ArrayRef> { /// Array_sort SQL function pub fn array_sort(args: &[ArrayRef]) -> Result<ArrayRef> { + if args.is_empty() || args.len() > 3 { Review Comment: I think we need to make it more usable in future for all built in functions. To provide the exact available signatures, to let user quickly find what is his mistake -- 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