timsaucer commented on code in PR #13468: URL: https://github.com/apache/datafusion/pull/13468#discussion_r1850888159
########## datafusion/common/src/utils/mod.rs: ########## @@ -324,18 +324,29 @@ pub fn longest_consecutive_prefix<T: Borrow<usize>>( /// Wrap an array into a single element `ListArray`. /// For example `[1, 2, 3]` would be converted into `[[1, 2, 3]]` /// The field in the list array is nullable. -pub fn array_into_list_array_nullable(arr: ArrayRef) -> ListArray { - array_into_list_array(arr, true) +pub fn array_into_list_array_nullable( + arr: ArrayRef, + field_name: Option<&str>, +) -> ListArray { + array_into_list_array(arr, true, field_name) } /// Array Utils /// Wrap an array into a single element `ListArray`. /// For example `[1, 2, 3]` would be converted into `[[1, 2, 3]]` -pub fn array_into_list_array(arr: ArrayRef, nullable: bool) -> ListArray { +pub fn array_into_list_array( + arr: ArrayRef, + nullable: bool, + field_name: Option<&str>, Review Comment: We can but that means we'd now have to add type annotations to everywhere we call this, including those that are going to pass `None` because they don't have field elements. I think this would add bloat that doesn't really add much value. If you feel strongly, I'll make the adjustment. -- 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