NVIDIA / NVIDIA/cudf

[FEA] Couple null mask and null count in all APIs

Open
#15,256 0 comments 1 reaction 0 assignees View on GitHub
feature request libcudf
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Is your feature request related to a problem? Please describe.**
We currently have APIs that accept a null mask and a null count as parameters. Historically, these APIs made sense because the count was loosely coupled to the mask in the sense that it could be omitted and it would be inferred. As of #13372, this is no longer possible and the null count must be known when a column is constructed. Therefore, allowing the null mask and the null count to be provided separately is no longer possible. From an API design perspective, it would make more sense to have them tightly coupled.

**Describe the solution you'd like**
We should update all APIs involving a mask and count to instead accept the two as a pair (or as a simple POD struct if we prefer) that encodes both. This change would more clearly signal to users that the two must be provided and used together.

**Describe alternatives you've considered**
None

**Additional context**
Implementing this would effectively fix #13154, but it would be a breaking change to the existing API rather than adding an overload.

See https://github.com/rapidsai/cudf/pull/13311#discussion_r1188969201 for some of the discussion that originally sparked this idea.

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.