Skip to content

Commit

Permalink
Discard null mask if there is no nulls
Browse files Browse the repository at this point in the history
Signed-off-by: Nghia Truong <[email protected]>
  • Loading branch information
ttnghia committed Oct 10, 2024
1 parent 7453ef4 commit ee5b7fd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cpp/src/strings/strings_column_factories.cu
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,14 @@ std::vector<std::unique_ptr<column>> make_strings_column_batch(
strings_count,
stream,
mr);
output[idx] = make_strings_column(strings_count,
std::move(offsets_cols[idx]),
chars_data.release(),
strings_count - valid_count,
std::move(null_masks[idx]));

auto const null_count = strings_count - valid_count;
output[idx] =
make_strings_column(strings_count,
std::move(offsets_cols[idx]),
chars_data.release(),
null_count,
null_count ? std::move(null_masks[idx]) : rmm::device_buffer{});
}

return output;
Expand Down

0 comments on commit ee5b7fd

Please sign in to comment.