tustvold commented on a change in pull request #1214:
URL: https://github.com/apache/arrow-rs/pull/1214#discussion_r789070642



##########
File path: parquet/src/arrow/levels.rs
##########
@@ -711,12 +711,11 @@ impl LevelInfo {
                 ((0..=(len as i64)).collect(), array_mask)
             }
             DataType::List(_) | DataType::Map(_, _) => {
-                let data = array.data();
-                let offsets = unsafe { data.buffers()[0].typed_data::<i32>() };
+                let offsets = unsafe { 
array.data().buffers()[0].typed_data::<i32>() };
                 let offsets = offsets
                     .to_vec()
                     .into_iter()
-                    .skip(offset)
+                    .skip(array.offset() + offset)

Review comment:
       This was a pre-existing bug, that people would have run into if they 
wrote a sliced RecordBatch




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