Jefffrey commented on code in PR #10835:
URL: https://github.com/apache/arrow-rs/pull/10835#discussion_r3872188269
##########
arrow-data/src/data.rs:
##########
@@ -696,19 +696,34 @@ impl ArrayData {
assert!(end <= self.len());
if let DataType::Struct(_) = self.data_type() {
- // Slice into children
- let new_offset = self.offset + offset;
+ // As documented on [`Self::offset`], a struct has no buffers of
its
+ // own and its offset composes with each child's offset: logical
+ // element `i` is element `self.offset + i` of every child.
+ //
+ // The slice must therefore be applied exactly once. Previously it
Review Comment:
theres no need to mention the previous behaviour; just justify the current
behaviour
--
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]