rluvaton commented on code in PR #7596:
URL: https://github.com/apache/arrow-rs/pull/7596#discussion_r2161882072


##########
arrow-data/src/data.rs:
##########
@@ -551,11 +551,10 @@ impl ArrayData {
 
         if let DataType::Struct(_) = self.data_type() {
             // Slice into children
-            let new_offset = self.offset + offset;
             let new_data = ArrayData {
                 data_type: self.data_type().clone(),
                 len: length,
-                offset: new_offset,
+                offset: self.offset,

Review Comment:
   I would add a comment that offsets are for buffers and child data,
   buffers are empty for struct (I would add an assertion for that) and offset 
for child data is cumulative, so keeping this offset as we already update the 
offset for the children.



-- 
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]

Reply via email to