Skip to content

Introduce NullBuffer::try_from_unsliced to simplify array construction #9385

Closed

Description

@liamzwbao

This pattern of creating a BooleanBuffer from with a length and then filtering for nulls count is quite common (and becoming more so)

I wonder if we should (as a follow on PR) make a function to do it, maybe like

let Option<NullBuffer> = NullBuffer::try_from_unsliced(b, array.len())

Then this code would look like

let nulls = array
        .nulls()
        .map(|n| n.inner().sliced())
        .map(|b| NullBuffer::try_from_unsliced(b, array.len()

🤔

Originally posted by @alamb in #9338 (comment)

Activity

  1. Eyad3skr commented on Feb 10, 2026

    @Eyad3skr
    Contributor

    Hey, I’d like to take this one. I’ll work on adding the NullBuffer helper + tests, then update a few call sites

  2. alamb commented on Feb 10, 2026

    @alamb
    Contributor

    Sounds like a good plan -- thank you

  3. added a commit that references this issue on Feb 24, 2026
    a2cffdb
  4. added
    parquet
    on Mar 18, 2026
  5. alamb commented on Mar 18, 2026

    @alamb
    Contributor

    label_issue.py automatically added labels {'parquet'} from #9411

  6. added
    arrow
    on Mar 18, 2026
  7. alamb commented on Mar 18, 2026

    @alamb
    Contributor

    label_issue.py automatically added labels {'arrow'} from #9411

  8. added
    performance
    on Mar 18, 2026
  9. alamb commented on Mar 18, 2026

    @alamb
    Contributor

    label_issue.py automatically added labels {'performance'} from #9338

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowparquetperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions