Skip to content

Commit

Permalink
User resource fix for replace_nulls (#7769)
Browse files Browse the repository at this point in the history
`cudf::replace_nulls` was copying the input column with the default stream and resource when there is no null. This simple PR is to make sure to pass the right stream and resource to the copy constructor.

Authors:
  - Wonchan Lee (https://github.com/magnatelee)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - Mike Wilson (https://github.com/hyperbolic2346)
  - MithunR (https://github.com/mythrocks)
  - Nghia Truong (https://github.com/ttnghia)
  - Ram (Ramakrishna Prabhu) (https://github.com/rgsl888prabhu)
  - Karthikeyan (https://github.com/karthikeyann)

URL: #7769
  • Loading branch information
magnatelee authored Apr 1, 2021
1 parent 5f1dc79 commit e8f62ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/replace/nulls.cu
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ std::unique_ptr<cudf::column> replace_nulls(cudf::column_view const& input,
CUDF_EXPECTS(replacement.size() == input.size(), "Column size mismatch");

if (input.is_empty()) { return cudf::empty_like(input); }
if (!input.has_nulls()) { return std::make_unique<cudf::column>(input); }
if (!input.has_nulls()) { return std::make_unique<cudf::column>(input, stream, mr); }

return cudf::type_dispatcher<dispatch_storage_type>(
input.type(), replace_nulls_column_kernel_forwarder{}, input, replacement, stream, mr);
Expand Down

0 comments on commit e8f62ea

Please sign in to comment.