2010YOUY01 commented on code in PR #25924:
URL: https://github.com/apache/datafusion/pull/25924#discussion_r4155452217
##########
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:
> My concern is the public array_array helper
I've checked this function, it's made public due to internal cross-crate
reuse, and it's not supposed to use by downstream.
We just figure out a way to hide them from the public API very recently
-
https://datafusion.apache.org/contributor-guide/api-health.html#datafusion-internal-public-apis
(there seem to be many internal public APIs leak, I'm trying to clean them
up soon)
So it should only get called from SQL interface array functions, I give it
another thought and it should be correct if we have this constraint, but let me
know if I'm still missing some edge cases.
--
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]