AdamGS commented on code in PR #9625:
URL: https://github.com/apache/arrow-rs/pull/9625#discussion_r3021309988
##########
arrow-select/src/take.rs:
##########
@@ -490,104 +490,132 @@ fn take_boolean<IndexType: ArrowPrimitiveType>(
BooleanArray::new(val_buf, null_buf)
}
+/// Copies byte ranges from `src` into a new contiguous buffer.
+///
+/// # Safety
+/// Each `(start, end)` in `ranges` must be in-bounds of `src`, and
+/// `capacity` must equal the total bytes across all ranges.
+unsafe fn copy_byte_ranges(
+ src: &[u8],
+ ranges: &[(usize, usize)],
+ capacity: usize,
+ values: &mut Vec<u8>,
+) {
+ values.reserve(capacity);
Review Comment:
yeah this might be a bit confusing, this being a function is a remanent of a
previous iteration but I might just inline it which I think makes it clearer.
--
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]