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
///
/// - buffer must contain valid arrow offsets ( [`OffsetBuffer`] ) for the
/// given length and offset.
unsafe fn get_offsets_from_buffer<O: ArrowNativeType>(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a version of get_offsets immediately above here that takes the Buffers rather than ArrayData. Once I have ported all the arrays, I will remove get_offsets

value_data,
data_type: T::DATA_TYPE,
nulls: data.nulls().cloned(),
data_type,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This also saves calling Drop on DataType and a clone of Nulls -- probably not measurable but faster 🤷

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.

Looks good, thanks @alamb!

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.

3 participants