You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2025/01/04 14:36:58 UTC
Re: [PR] Improve `Buffer` documentation, add `From` and `From` impls [arrow-rs]
alamb commented on code in PR #6939:
URL: https://github.com/apache/arrow-rs/pull/6939#discussion_r1903108763
##########
arrow-buffer/src/buffer/immutable.rs:
##########
@@ -28,8 +28,43 @@ use crate::{bit_util, bytes::Bytes, native::ArrowNativeType};
use super::ops::bitwise_unary_op_helper;
use super::{MutableBuffer, ScalarBuffer};
-/// Buffer represents a contiguous memory region that can be shared with other buffers and across
-/// thread boundaries.
+/// A contiguous memory region that can be shared with other buffers and across
+/// thread boundaries that stores Arrow data.
+///
+/// `Buffer`s can be sliced and cloned without copying the underlying data and can
+/// be created from memory allocated by non-Rust sources such as C/C++.
+///
+/// # Example: Create a `Buffer` from a `Vec` (without copying)
Review Comment:
The rest of this PR is driven by the examples: converting to/from `bytes::Bytes` and `Vec`. I think it will be easier to do this operation now and not get hung up on `Bytes` vs `bytes::Bytes`
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org