Skip to content

[C++][Compute] count kernel miscounts when run-end encoded array contains null #49888

@pitrou

Description

@pitrou

Describe the bug, including details regarding any error messages, version, and platform.

See this snippet:

>>> a = pa.array([11,11,11,42,42,5,None])
>>> r = pc.run_end_encode(a)

>>> pc.count(a, mode='only_valid')
<pyarrow.Int64Scalar: 6>
>>> pc.count(a, mode='only_null')
<pyarrow.Int64Scalar: 1>
>>> pc.count(a, mode='all')
<pyarrow.Int64Scalar: 7>

>>> pc.count(r, mode='only_valid')
<pyarrow.Int64Scalar: 7>
>>> pc.count(r, mode='only_null')
<pyarrow.Int64Scalar: 0>
>>> pc.count(r, mode='all')
<pyarrow.Int64Scalar: 7>

A similar issue in hash_count was fixed in #35059.

Component(s)

C++

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions