alamb commented on code in PR #7037:
URL: https://github.com/apache/arrow-rs/pull/7037#discussion_r1932251283


##########
arrow-select/src/concat.rs:
##########
@@ -156,10 +158,23 @@ fn concat_lists<OffsetSize: OffsetSizeTrait>(
         NullBuffer::new(nulls.finish())
     });
 
-    let values: Vec<&dyn Array> = lists
-        .iter()
-        .map(|x| x.values().as_ref())
-        .collect::<Vec<_>>();
+    // If any of the lists have slices, we need to slice the values
+    // to ensure that the offsets are correct
+    let mut sliced_values;

Review Comment:
   While I was futzing with this, I figured I would avoid `slice` on the values 
unless it was necessary. 
   
   I can make this code simpler if we always slice but that will always make an 
ArrayRef clone



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

Reply via email to