Skip to content
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

Merged
merged 3 commits into from
Mar 23, 2023
Merged

Conversation

tustvold
Copy link
Contributor

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?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Mar 21, 2023
let data = unsafe {
ArrayData::builder(DataType::Boolean)
.len(values.len())
.offset(values.offset())
Copy link
Contributor

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?

Copy link
Contributor Author

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

@@ -60,6 +62,12 @@ impl BooleanBuffer {
}
}

/// Invokes `f` with values `0..len` collecting the boolean results into a new `BooleanBuffer`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 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`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants