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-44446: [C++][Python] Add mask creation helper #44447

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Format C++
amol- committed Dec 2, 2024
commit 3396732d942e2e388e933abc76581c22b4efdcf4
3 changes: 2 additions & 1 deletion cpp/src/arrow/array/util.cc
Original file line number Diff line number Diff line change
@@ -925,7 +925,8 @@ Result<std::shared_ptr<Array>> MakeMaskArray(const std::vector<int64_t>& indices
auto i = indices.begin();
for (int64_t builder_i = 0; builder_i < length; builder_i++) {
amol- marked this conversation as resolved.
Show resolved Hide resolved
if (i == indices_end) {
RETURN_NOT_OK(builder.AppendValues(static_cast<int64_t>(length - builder.length()), false));
RETURN_NOT_OK(
builder.AppendValues(static_cast<int64_t>(length - builder.length()), false));
break;
} else if (builder_i == *i) {
builder.UnsafeAppend(true);