Skip to content

Commit

Permalink
Handle all nulls input
Browse files Browse the repository at this point in the history
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
  • Loading branch information
ttnghia committed Jul 17, 2024
1 parent 750fcca commit ef6d7c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/cpp/src/get_json_object.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,14 @@ std::vector<std::unique_ptr<cudf::column>> get_json_object(
return output;
}

// Input is all nulls - just return all null columns.
if (input.size() == input.null_count()) {
for (std::size_t idx = 0; idx < num_outputs; ++idx) {
output.emplace_back(std::make_unique<cudf::column>(input.parent(), stream, mr));
}
return output;
}

auto const d_input_ptr = cudf::column_device_view::create(input.parent(), stream);
auto const in_offsets =
cudf::detail::offsetalator_factory::make_input_iterator(input.offsets(), input.offset());
Expand Down

0 comments on commit ef6d7c2

Please sign in to comment.