NVIDIA / NVIDIA/cudf

[FEA] Rename `apply_boolean_mask` to `copy_if` and move it from `stream_compaction.hpp` into `copying.hpp`

Open
#13,405 10 comments 0 reactions 0 assignees View on GitHub
1 - On Deck feature request libcudf Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

There are actually two FEAs in this issue which can be addressed separately:
* In `stream_compaction` module, we have the API `apply_boolean_mask` which copies the input to the output depending on a boolean mask array. This is currently categorized into stream compaction, but it can also be put into the `copying` module too. Since we already have `copy_if_else` API in `copying`, and also have `cudf::detail::copy_if(input, binary_pred)` API that does similar thing, we should better move this `apply_boolean_mask` into `copying` for consistency.
* In addition, the name `apply_boolean_mask` is very misleading. Its prefix `apply_` implies that we are doing something in place. However, what it does is actually copying from the (immutable) input into a new output table. Thus, it should be better rename into another overload of `copy_if` for better consistency with the current `cudf::detail::copy_if(input, binary_pred)` API.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.