spektom commented on PR #7868:
URL: https://github.com/apache/arrow-rs/pull/7868#issuecomment-3035058731
Consider I'm a developer of a function that accepts an array and performs
some operations on it.
After reading existing documentation of value_data() and offsets(), these
are basic assumptions I would make:
```
// pseudocode
fn my_func(array: &StringArray) {
let first_value = array.value(0);
// expect the value_data() to start with the first value:
assert_eq!(first_value, &array.value_data()[..first_value.len()]);
// expect the first offset to be 0
assert_eq!(0, array.offsets()[0]);
}
```
These assumptions may not be fulfilled if the array is a slice of another
array.
--
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]