feat: extract has_false and has_true from BooleanArray to BooleanBuffer and reuse for no nulls#9987
Conversation
`BooleanBuffer` and reuse for no nulls
| self.into_iter() | ||
| } | ||
|
|
||
| /// Returns an [`UnalignedBitChunk`] over this buffer's values. |
There was a problem hiding this comment.
this is nice -- it just moves the code down a level (into BooleanBuffer out of BooleanArray)
|
run benchmark boolean_kernels |
1 similar comment
|
run benchmark boolean_kernels |
|
CI test failure looks unrelated https://github.com/apache/arrow-rs/actions/runs/26001934862/job/76426635449?pr=9987 |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing move-some-func-to-boolean-buffer (273da35) to fd1c5b3 (merge-base) diff File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing move-some-func-to-boolean-buffer (273da35) to fd1c5b3 (merge-base) diff File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
Merging up to pick up CI fix |
|
Thanks again @rluvaton |
Which issue does this PR close?
N/A
Rationale for this change
So we can use the useful helpers without creating temp
BooleanArrayWhat changes are included in this PR?
Extract non null variants for computing
has_falseandhas_truefromBooleanArraytoBooleanBufferand call them instead, and copied the tests for not nullableAre these changes tested?
Yes
Are there any user-facing changes?
2 new functions
Cc @alamb as talked in:
truncate_list_nullsand avoid counting all true bits datafusion#22158 (comment)