comphead commented on code in PR #22285:
URL: https://github.com/apache/datafusion/pull/22285#discussion_r3277544271


##########
datafusion/functions-nested/src/arrays_zip.rs:
##########
@@ -327,3 +331,183 @@ fn arrays_zip_inner(args: &[ArrayRef]) -> 
Result<ArrayRef> {
 
     Ok(Arc::new(result))
 }
+
+/// Fast path for regular List inputs whose existing buffers already match the
+/// zipped output: all offsets and values lengths match, and null rows cover no
+/// values. This lets us reuse offsets and child values instead of rebuilding.
+fn try_perfect_list_zip(args: &[ArrayRef]) -> Result<Option<ArrayRef>> {
+    let mut list_arrays = Vec::with_capacity(args.len());
+    let mut struct_fields = Vec::with_capacity(args.len());
+
+    for (i, arg) in args.iter().enumerate() {
+        let arr = match arg.data_type() {
+            List(field) => {
+                struct_fields.push(Field::new(
+                    (i + 1).to_string(),

Review Comment:
   lets send names as input params, as naming convention can be different, and 
in this case we would allow the end user to define their own stratgey



-- 
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]

Reply via email to