Skip to content

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

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++

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions