You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "liamzwbao (via GitHub)" <gi...@apache.org> on 2026/02/09 23:19:04 UTC

[I] Introduce `NullBuffer::try_from_unsliced` to simplify array construction [arrow-rs]

liamzwbao opened a new issue, #9385:
URL: https://github.com/apache/arrow-rs/issues/9385

   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 
   
   ```rust
   let Option<NullBuffer> = NullBuffer::try_from_unsliced(b, array.len())
   ```
   Then this code would look like 
   ```rust
   let nulls = array
           .nulls()
           .map(|n| n.inner().sliced())
           .map(|b| NullBuffer::try_from_unsliced(b, array.len()
   ```
   
   🤔
   
   _Originally posted by @alamb in https://github.com/apache/arrow-rs/pull/9338#discussion_r2766183359_
               


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Introduce `NullBuffer::try_from_unsliced` to simplify array construction [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #9385: Introduce `NullBuffer::try_from_unsliced` to simplify array construction
URL: https://github.com/apache/arrow-rs/issues/9385


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Introduce `NullBuffer::try_from_unsliced` to simplify array construction [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #9385:
URL: https://github.com/apache/arrow-rs/issues/9385#issuecomment-4084931008

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Introduce `NullBuffer::try_from_unsliced` to simplify array construction [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #9385:
URL: https://github.com/apache/arrow-rs/issues/9385#issuecomment-4084931681

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Introduce `NullBuffer::try_from_unsliced` to simplify array construction [arrow-rs]

Posted by "Eyad3skr (via GitHub)" <gi...@apache.org>.
Eyad3skr commented on issue #9385:
URL: https://github.com/apache/arrow-rs/issues/9385#issuecomment-3880211353

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Introduce `NullBuffer::try_from_unsliced` to simplify array construction [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #9385:
URL: https://github.com/apache/arrow-rs/issues/9385#issuecomment-4084931362

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Introduce `NullBuffer::try_from_unsliced` to simplify array construction [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #9385:
URL: https://github.com/apache/arrow-rs/issues/9385#issuecomment-3880691979

   Sounds like a good plan -- thank you


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org