Skip to content

[BUG] Remove null count from column_device_view #4368

@trevorsm7

Description

@trevorsm7

Is your feature request related to a problem? Please describe.
Creating a column_device_view from a column_view with an unknown null count results in the null count being computed, which can impact performance if the null count is not used. In many cases, the null count is used in host code to dispatch to different kernels for nullable and non-nullable columns, which doesn't require a device view. Within the cudf codebase, each instance where I found the column_device_view null count being accessed, there is a corresponding column_view within the same scope that could be used to query the null count instead.

For example:
d_column.null_count() here could be replaced with strings.null_count():

auto chars_column = create_chars_child_column( strings_count, d_column.null_count(), bytes, mr, stream );

p_left_dcol->has_nulls() here could be replaced with left_col.has_nulls():

if (p_left_dcol->has_nulls()) {
)

Describe the solution you'd like
Remove the _null_count, null_count(), and has_nulls() members from column_device_view. Replace instances of these methods with the corresponding column_view methods.

Describe alternatives you've considered
When constructing the column_device_view from a column with unknown null count, the unknown null count could be propagated to the device view rather than triggering the null count to be computed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglibcudfAffects libcudf (C++/CUDA) code.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions