alamb commented on code in PR #6427:
URL: https://github.com/apache/arrow-rs/pull/6427#discussion_r1801463734
##########
arrow-array/src/array/byte_view_array.rs:
##########
@@ -114,7 +114,7 @@ use super::ByteArrayType;
pub struct GenericByteViewArray<T: ByteViewType + ?Sized> {
data_type: DataType,
views: ScalarBuffer<u128>,
- buffers: Vec<Buffer>,
+ buffers: Arc<[Buffer]>,
Review Comment:
> Can i merge two arrays, combining their Arc<Buffer> s without moving or
cloning the buffers?
No -- you would have to create a new `Vec<Buffer`> (or some other way to get
`Arc<[Buffer]>`)
So while there are some cases where new allocations are required, slicing /
cloning is faster
--
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]