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)