Skip to content

Docs: Add additional documentation and example for make_array - #9112

Merged
Jefffrey merged 1 commit into
apache:mainfrom
alamb:alamb/make_array_docs
Jan 10, 2026
Merged

Jefffrey merged 1 commit into
apache:mainfrom
alamb:alamb/make_array_docs

Conversation

@alamb

@alamb alamb commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

@tustvold says #9058 (comment)

My 2 cents is it would be better to move the codepaths relying on ArrayData over to using the typed arrays directly, this should not only cut down on allocations but unnecessary validation and dispatch overheads.

Let's make sure the documentation also encodes this wisdom

What changes are included in this PR?

Improve the documentation for make_array to include the information about make_array

Are these changes tested?

By CI

Are there any user-facing changes?

Only docs and an example, no functional changes

@github-actions github-actions Bot added the arrow Changes to the arrow crate label Jan 7, 2026
/// // Create the ArrayRef from the ArrayData
/// let array = make_array(array_data);
///
/// // It is equivalent to directly constructing the Int32Array

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it is important to also add an example of what "directly constructing the array" means

@alamb
alamb marked this pull request as ready for review January 7, 2026 23:02
@alamb alamb added the documentation Improvements or additions to documentation label Jan 9, 2026
@Jefffrey
Jefffrey merged commit b765274 into apache:main Jan 10, 2026
@Jefffrey

Copy link
Copy Markdown
Contributor

Nice addition 👍

@alamb

alamb commented Jan 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @Jefffrey

Dandandan pushed a commit to Dandandan/arrow-rs that referenced this pull request Jan 15, 2026
…he#9112)

# Which issue does this PR close?

- Part of apache#9061

# Rationale for this change

@tustvold says
apache#9058 (comment)

> My 2 cents is it would be better to move the codepaths relying on
ArrayData over to using the typed arrays directly, this should not only
cut down on allocations but unnecessary validation and dispatch
overheads.

Let's make sure the documentation also encodes this wisdom 

# What changes are included in this PR?

Improve the documentation for `make_array` to include the information
about `make_array`

# Are these changes tested?

By CI
# Are there any user-facing changes?

Only docs and an example, no functional changes
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