Skip to content

GH-49889: [C++][Compute] Handle logical nulls in validity kernels#50269

Open
hadrian-reppas wants to merge 3 commits into
apache:mainfrom
hadrian-reppas:logical_nulls_compute
Open

GH-49889: [C++][Compute] Handle logical nulls in validity kernels#50269
hadrian-reppas wants to merge 3 commits into
apache:mainfrom
hadrian-reppas:logical_nulls_compute

Conversation

@hadrian-reppas

@hadrian-reppas hadrian-reppas commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

I was looking into #49889 and updated the handling of logical nulls in the is_valid, is_null, and true_unless_null kernels. It turns out there is some prior work here that I didn't see before I starting implementing my fix (#35058, #35036, #37642). For some reason, that work has stalled.

What changes are included in this PR?

This PR updates the IsValidExec, IsNullExec, and TrueUnlessNullExec kernels so that they call out to a new function SetLogicalNullBits. The SetLogicalNullBits function matches the logic in ArraySpan::ComputeLogicalNullCount(). The logic is similar enough that they may be some opportunities for code deduplication in dict_util.cc and ree_util.cc.

Are these changes tested?

Yes

Are there any user-facing changes?

No

@hadrian-reppas hadrian-reppas requested a review from pitrou as a code owner June 26, 2026 11:25
@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@hadrian-reppas hadrian-reppas changed the title [C++] Handle logical nulls in validity kernels GH-49889: [C++][Compute] Handle logical nulls in validity kernels Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant