Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Jan 15, 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 15, 2026
data_type: data.data_type().clone(),
data_type,
values,
nulls: data.nulls().cloned(),
Copy link
Contributor Author

@alamb alamb Jan 15, 2026

Choose a reason for hiding this comment

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

This saves a clone /call to DataType::drop as well as a Clone of Buffer (which is fairly inexpensive).

I don't think it will make any different in performance, but the code is cleaner and now consistent with other array types so I think this change is worth making

Copy link
Contributor

@albertlockett albertlockett 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 @alamb

Copy link
Member

@rluvaton rluvaton left a comment

Choose a reason for hiding this comment

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

LGTM

@Dandandan Dandandan merged commit 1035781 into apache:main Jan 15, 2026
26 checks passed
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