Skip to content

Commit

Permalink
Use valid count returned by inplace_bitmask_and to compute and assign…
Browse files Browse the repository at this point in the history
… the null count.
  • Loading branch information
bdice committed Jan 12, 2022
1 parent 33525d9 commit d1b90f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cpp/src/structs/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,15 @@ void superimpose_parent_nulls(bitmask_type const* parent_null_mask,
reinterpret_cast<bitmask_type const*>(parent_null_mask),
reinterpret_cast<bitmask_type const*>(current_child_mask)};
std::vector<size_type> begin_bits{0, 0};
[[maybe_unused]] auto const null_count = cudf::detail::inplace_bitmask_and(
auto const valid_count = cudf::detail::inplace_bitmask_and(
device_span<bitmask_type>(current_child_mask, num_bitmask_words(child.size())),
masks,
begin_bits,
child.size(),
stream,
mr);
child.set_null_count(UNKNOWN_NULL_COUNT);
auto const null_count = child.size() - valid_count;
child.set_null_count(null_count);
}

// If the child is also a struct, repeat for all grandchildren.
Expand Down

0 comments on commit d1b90f9

Please sign in to comment.