Jefffrey commented on issue #9068: URL: https://github.com/apache/arrow-rs/issues/9068#issuecomment-3702112500
> however, in the case of RunArray and BooleanArray there is no zero-copy way to do this, and therefore offset is preserved I'm a bit confused by this, since the code suggests we do push the offsets down into the buffers, unless I misunderstand what you mean here? > It is the un-materialised offset into the array if any, the offsets of the buffers are unrelated.. If I'm understanding this correctly, all arrays (except run/boolean) treat slicing as materialising the offset, so slicing a primitivearray would return offset of 0 always since we don't do logical offsetting at the array level, only in the buffers? I ask this because I saw some usages of `offset()` in the codebase but got a bit turned around when I realized most of the `offset()` implementations just returned 0. For example, this test fails because `MapArray` doesn't keep track of the offset: https://github.com/apache/arrow-rs/blob/843bee2c21dbe40a228c37dae7ecd876d73ee5de/arrow-array/src/array/map_array.rs#L628-L636 - Line 635 So I'm wondering if this is because MapArray is supposed to implement offset tracking and not default to returning 0, or if the test itself is flawed 🤔 -- 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]
