-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BooleanArray::new (#3879) #3898
Conversation
65c28c5
to
7cf2ebd
Compare
let data = unsafe { | ||
ArrayData::builder(DataType::Boolean) | ||
.len(values.len()) | ||
.offset(values.offset()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not directly related to the BooleanArray
, but do we now allow different offsets for values and null buffers and do compute kernels handle this correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this change landed in #3778
arrow-buffer/src/buffer/boolean.rs
Outdated
@@ -60,6 +62,12 @@ impl BooleanBuffer { | |||
} | |||
} | |||
|
|||
/// Invokes `f` with values `0..len` collecting the boolean results into a new `BooleanBuffer` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Invokes `f` with values `0..len` collecting the boolean results into a new `BooleanBuffer` | |
/// Invokes `f` with indexes `0..len` collecting the boolean results into a new `BooleanBuffer` |
Which issue does this PR close?
Part of #3879
Rationale for this change
Adds a safe API for constructing a BooleanArray from its constituent parts.
I have confirmed this has no impact on benchmarks
What changes are included in this PR?
Are there any user-facing changes?