jorgecarleitao commented on a change in pull request #9496: URL: https://github.com/apache/arrow/pull/9496#discussion_r582553582
########## File path: rust/arrow/src/buffer/immutable.rs ########## @@ -36,7 +36,7 @@ use super::MutableBuffer; #[derive(Clone, PartialEq, Debug)] pub struct Buffer { /// the internal byte buffer. - data: Arc<Bytes>, + data: Arc<Bytes<u8>>, Review comment: I agree. However, we can't make `Buffer<T>` because `ArrayData` force us to use an homogeneous type across all buffers. We can't drop `ArrayData` because FFI, IPC, CSV, JSON, equality and `array/transform` depend on it. This PR was a stop-gap. Th target design for me is in the proposal. Specifically, for primitive arrays, it would look like [this](https://github.com/jorgecarleitao/arrow2/pull/1/files#diff-cf8609b9611f68471d67abdf758a24b18f4f89c0a74922b080ebf8e23d884ee1R15) But because of what I wrote (a lot of dependencies on `ArrayData`), it requires a large (like +10k lines large) refactor of this crate. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org