Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-44795: [C++] Use arrow::util::span on arrow::util::bitmap_builders_utilities instead of std::vector #44796

Merged
merged 3 commits into from
Dec 18, 2024

Conversation

raulcd
Copy link
Member

@raulcd raulcd commented Nov 20, 2024

Rationale for this change

arrow::util::span (a backport of C++20 std::span) is more generally applicable than std::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 accepts arrow::util::span instead of std::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) to Result<std::shared_ptr<Buffer>> BytesToBits(util::span<const uint8_t> bytes, MemoryPool* pool)

Copy link

⚠️ GitHub issue #44795 has been automatically assigned in GitHub to PR creator.

@raulcd
Copy link
Member Author

raulcd commented Nov 20, 2024

The macOS CI failures are unrelated, I opened: #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 raulcd marked this pull request as ready for review November 20, 2024 15:37
@raulcd raulcd requested a review from wgtmac as a code owner November 20, 2024 15:37
@pitrou
Copy link
Member

pitrou commented Nov 20, 2024

@raulcd Yes, this is the kind of change I had in mind. See comments.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @raulcd

@pitrou pitrou merged commit 7af2ad4 into apache:main Dec 18, 2024
40 checks passed
@pitrou pitrou removed the awaiting committer review Awaiting committer review label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants