Skip to content

Use NullBuffer::union_many when appropriate #21880

Description

@alamb

Is your feature request related to a problem or challenge?

Several DataFusion PRs (#21464, #21468, #21471, #21475, #21477, #21482, #21532) optimize NULL handling in scalar functions by replacing row-by-row null buffer construction with bulk NullBuffer::union. When 3+ null buffers need combining, they chain binary union calls, each allocating a new BooleanBuffer.

@mbutrovich added a new NullBuffer::union_many API in arrow 58.2.0 that avoids this allocation

Describe the solution you'd like

Use NullBuffer::union_many instead of NullBuffer::union when unioning together multiple buffers

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. added theissue type on Apr 27, 2026
  2. alamb commented on Apr 27, 2026

    @alamb
    ContributorAuthor

    Note we need arrow 58.2.0 to be released

    I have a PR draft to do this, but I need to finalize the release first

  3. mbutrovich commented on Apr 27, 2026

    @mbutrovich
    Contributor

    Thanks for making an issue to revisit this, @alamb!

  4. neilconway commented on Apr 27, 2026

    @neilconway
    Contributor

    take

  5. added a commit that references this issue on May 8, 2026
    53517af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions