kumarUjjawal commented on code in PR #25924:
URL: https://github.com/apache/datafusion/pull/25924#discussion_r4153385068
##########
datafusion/functions-nested/src/make_array.rs:
##########
@@ -199,9 +192,11 @@ pub fn array_array<O: OffsetSizeTrait>(
data_type: DataType,
field_name: &str,
) -> Result<ArrayRef> {
- // do not accept 0 arguments.
if args.is_empty() {
- return plan_err!("Array requires at least one argument");
+ let array = new_null_array(&Null, 0);
Review Comment:
Yes, List(Null) is correct for SQL make_array(). My concern is the public
array_array helper, which accepts an offset type, element type, and field name.
For example, array_array::<i64>(&[], DataType::Int32, "element") now returns
List(Null), ignoring those parameters.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]