rluvaton opened a new pull request, #10116: URL: https://github.com/apache/arrow-rs/pull/10116
# Which issue does this PR close? N/A # Rationale for this change before, `Buffer::into_mutable` would panic if you pass it `Buffer` that was offseted from the underlying bytes, **but** it would be ok for sliced `Buffer` that start at the same position but ends before the data_ptr itself, so the mutable buffer had data that was outside the slice in that case. this would allow sliced buffer to be converted to `MutableBuffer`. if they don't want to convert to `MutableBuffer` for sliced `Buffer` they can call the new `is_sliced` function before. # What changes are included in this PR? added `Buffer::is_sliced` function and remove the panic if calling `Buffer::into_mutable` on owned sliced (where `data_ptr` is not `ptr` in the `Buffer`) `Buffer` # Are these changes tested? Yes # Are there any user-facing changes? Yes, new function and allowed for converting the entire buffer including data outside the slice to mutable -- 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]
