Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Jan 13, 2026

Which issue does this PR close?

Rationale for this change

Let's make arrow-rs the fastest we can and the fewer allocations the better

What changes are included in this PR?

Apply pattern from #9114

Are these changes tested?

Existing tests

Are there any user-facing changes?

No

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jan 13, 2026
Copy link
Contributor

@scovich scovich left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 398 to +403
assert_eq!(
data.buffers().len(),
buffers.len(),
1,
"BooleanArray data should contain a single buffer only (values buffer)"
);
let values = BooleanBuffer::new(data.buffers()[0].clone(), data.offset(), data.len());
let buffer = buffers.pop().expect("checked above");
Copy link
Contributor

@scovich scovich Jan 13, 2026

Choose a reason for hiding this comment

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

aside: it's a bit annoying that we can't just do let [buffer] = buffers else { ... }

(let [buffer] = buffers[..] else { ... } produces a slice ref that would match but only capture a borrow instead of consuming it like we want here)

Copy link
Contributor

@etseidl etseidl left a comment

Choose a reason for hiding this comment

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

LGTM2!

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 performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants