Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Nov 3, 2025

Which issue does this PR close?

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

@alamb alamb added the documentation Improvements or additions to documentation label Nov 3, 2025
@github-actions github-actions bot added the arrow Changes to the arrow crate label Nov 3, 2025
Copy link
Member

@wjones127 wjones127 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 helpful! One clarification.

Comment on lines +42 to +44
/// // convert the buffer back to Vec without copy assuming:
/// // 1. the inner buffer is not sliced
/// // 2. the inner buffer uses standard allocation
Copy link
Member

Choose a reason for hiding this comment

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

Is there also a requirement for the reference count of the buffer to be 1?

Copy link
Member

Choose a reason for hiding this comment

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

I think @mbrobbel 's comment applies here too #8771 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Excellent call -- added in dac99aa. Thank you 🙏

@mbrobbel mbrobbel merged commit f9dd799 into apache:main Nov 4, 2025
26 checks passed
@mbrobbel
Copy link
Member

mbrobbel commented Nov 4, 2025

Thanks @alamb, @wjones127 and @kylebarron

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.

4 participants