Skip to content

Commit

Permalink
Remove call to make_structs_column
Browse files Browse the repository at this point in the history
Signed-off-by: Nghia Truong <[email protected]>
  • Loading branch information
ttnghia committed Nov 14, 2024
1 parent f375a4d commit 034a5ec
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/cpp/src/from_json_to_structs.cu
Original file line number Diff line number Diff line change
Expand Up @@ -817,13 +817,15 @@ std::unique_ptr<cudf::column> from_json_to_structs(cudf::strings_column_view con
auto [null_mask, null_count] = cudf::detail::valid_if(
valid_it, valid_it + should_be_nullified->size(), thrust::logical_not{}, stream, mr);

return cudf::make_structs_column(
// Do not use `cudf::make_structs_column` since we do not need to call `superimpose_nulls`
// on the children columns.
return std::make_unique<cudf::column>(
cudf::data_type{cudf::type_id::STRUCT},
input.size(),
std::move(converted_cols),
null_count,
rmm::device_buffer{},
null_count > 0 ? std::move(null_mask) : rmm::device_buffer{0, stream, mr},
stream,
mr);
null_count,
std::move(converted_cols));
}

} // namespace
Expand Down

0 comments on commit 034a5ec

Please sign in to comment.