Open raulcd opened 1 day ago
:warning: GitHub issue #44795 has been automatically assigned in GitHub to PR creator.
The macOS CI failures are unrelated, I opened: https://github.com/apache/arrow/issues/44797 @pitrou is something like this what you had in mind? I did it for a single API method just to validate I understood what you had in mind. I can open subtasks or aggregate some more on a single PR.
@raulcd Yes, this is the kind of change I had in mind. See comments.
Rationale for this change
arrow::util::span
(a backport of C++20std::span
) is more generally applicable thanstd::vector
, so any public API currently accepting a vector const-ref argument should instead accept a span argument.What changes are included in this PR?
arrow::util::BytesToBits
acceptsarrow::util::span
instead ofstd::vector
Are these changes tested?
Yes, existing C++ tests via CI
Are there any user-facing changes?
Yes, from
Result<std::shared_ptr<Buffer>> BytesToBits(const std::vector<uint8_t>&, MemoryPool* pool)
toResult<std::shared_ptr<Buffer>> BytesToBits(util::span<const uint8_t> bytes, MemoryPool* pool)