Jefffrey commented on code in PR #11536:
URL: https://github.com/apache/arrow-rs/pull/11536#discussion_r4257147558


##########
arrow-data/src/equal/run.rs:
##########
@@ -63,8 +64,12 @@ impl<'a, T: ArrowNativeType + ToPrimitive> RunArrayData<'a, 
T> {
         // SAFETY: we're reconstructing RunEndBuffer from a known valid 
RunArray
         let run_ends = unsafe {
             RunEndBuffer::<T>::new_unchecked(
-                raw_run_ends_buffer.clone().into(),
-                run_ends_data.offset() + data.offset() + start,
+                ScalarBuffer::new(
+                    raw_run_ends_buffer.clone(),
+                    run_ends_data.offset(),
+                    run_ends_data.len(),
+                ),
+                data.offset() + start,

Review Comment:
   `run_ends_data.offset()` = physical offset into runs child, which is an array
   
   `data.offset()` = logical offset into run array itself
   
   we cant add them together, as they offset different things



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