Jefffrey commented on code in PR #10838:
URL: https://github.com/apache/arrow-rs/pull/10838#discussion_r3860365179
##########
arrow-data/src/data.rs:
##########
@@ -471,7 +476,57 @@ impl ArrayData {
self.len == 0
}
- /// Returns the offset of this [`ArrayData`]
+ /// Returns the offset in elements of this [`ArrayData`]
+ ///
+ /// The offset applies to [`Self::buffers`] and [`Self::child_data`],
+ /// but does NOT apply to [`Self::nulls`], which always represents exactly
+ /// [`Self::len`] elements.
+ ///
+ /// # Offsets for Non-nested types
+ ///
+ /// For non-nested types, the offset skips leading elements in the buffers.
+ /// Logical element `i` is stored at physical position `offset + i`.
+ ///
+ /// For example, with `offset = 2` and `len = 3` the following array
Review Comment:
<img width="1200" height="675" alt="Image"
src="https://github.com/user-attachments/assets/2244fda3-5b13-4090-b971-eb861b658ef4"
/>
--
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]