alamb opened a new pull request, #8854: URL: https://github.com/apache/arrow-rs/pull/8854
…thods, deprecate old methods # Which issue does this PR close? - part of https://github.com/apache/arrow-rs/issues/8806 # Rationale for this change 1. bitwise_bin_op_helper and bitwise_unary_op_helper are somewhat hard to find and use as explained on https://github.com/apache/arrow-rs/pull/8807 2. I want to optimize bitwise operations even more heavily (see https://github.com/apache/arrow-rs/pull/8807) so I want the implementations centralized so I can focus the efforts there Also, I think these APIs I think cover the usecase explained by @jorstmann on https://github.com/apache/arrow-rs/issues/8561: > Building a new buffer by starting from an empty state and incrementally appending new bits (append_value, append_slice, append_packed_range and similar methods). By creating a method on Buffer directly, it is easier to find, and it is clearer that a new Buffer is being created. # What changes are included in this PR? Changes: 1. Add `Buffer::from_bitwise_unary` and `Buffer::from_bitwise_binary` methods that do the same thing as `bitwise_unary_op_helper` and `bitwise_bin_op_helper` but are easier to find and use 2. Deprecate `bitwise_unary_op_helper` and `bitwise_bin_op_helper` in favor of the new Buffer methods 3. Document the new methods, with examples (specifically that the bitwise operations operate on bits, not bytes and shouldn't do any cross byte operations) # Are these changes tested? Yes, new doc tests # Are there any user-facing changes? New APIs, some deprecated -- 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]
