Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Nov 3, 2025

Which issue does this PR close?

Rationale for this change

It may not be obvious how to convert certain Arrow arrays to/from Vec without copying for manipulation, so let's add an example

What changes are included in this PR?

  1. Add note about zero copy arrays
  2. Add examples of modifying a primitive array using zero-copy conversion to/from Vec

Are these changes tested?

By CI

Are there any user-facing changes?

Docs only, no functional change

@github-actions github-actions bot added the arrow Changes to the arrow crate label Nov 3, 2025
@alamb alamb changed the title Add example to convert a PrimitiveArray to a Vec Add example to convert PrimitiveArray to a Vec Nov 3, 2025
Copy link
Contributor

@vegarsti vegarsti left a comment

Choose a reason for hiding this comment

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

This is great! Thank you!

@alamb alamb added the documentation Improvements or additions to documentation label Nov 3, 2025
@mbrobbel mbrobbel merged commit e2ebb23 into apache:main Nov 4, 2025
26 checks passed
@mbrobbel
Copy link
Member

mbrobbel commented Nov 4, 2025

Thanks @alamb and @vegarsti

mbrobbel pushed a commit that referenced this pull request Nov 4, 2025
# Which issue does this PR close?

- Similar to #8771

# Rationale for this change

As people write more arrow kernels, let's make it easier to understand
how to go back/forth to Vec without copying

# What changes are included in this PR?

Add some additional information and examples about converting
ScalarBuffer back/forth to Vec

# Are these changes tested?

Yes by CI

# Are there any user-facing changes?

Docs only. No functional change
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 documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants