Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update arrow rustdocs (#4071) #4197

Merged
merged 2 commits into from
May 11, 2023
Merged

Update arrow rustdocs (#4071) #4197

merged 2 commits into from
May 11, 2023

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented May 10, 2023

Which issue does this PR close?

Part of #4071

Rationale for this change

The current docs are out of date following #4061, and the output for some is pretty hard to parse

image

This updates the docs so that the type summaries are a single line and sufficiently descriptive, and adds some new content about array buffers.

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label May 10, 2023
@tustvold tustvold added documentation Improvements or additions to documentation development-process Related to development process of arrow-rs labels May 10, 2023
@@ -19,50 +19,14 @@
//! all having the same type. This crate provides concrete implementations of each type, as
//! well as an [`Array`] trait that can be used for type-erasure.
//!
//! # Downcasting an Array
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 content is moved later

//!
//! assert_eq!(2, array.value(2), "Get the value with index 2");
//! # Low-level API
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 reworks the internal representation section, taking some inspiration from https://jorgecarleitao.github.io/arrow2/main/guide/low_level.html

@@ -317,19 +317,6 @@
//! assert_eq!(string.value(1), "foo");
//! ```
//!
//! # Memory and Buffers
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 section is outdated and documenting it at this level just adds confusion, lets leave that for the arrow_array docs

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @tustvold -- I went over these changes carefully and I think they are a great step forward

@@ -25,7 +25,7 @@ use arrow_schema::{ArrowError, DataType};
use std::any::Any;
use std::sync::Arc;

/// An array where each element is a fixed-size sequence of bytes.
/// An array of [fixed size binary arrays](https://arrow.apache.org/docs/format/Columnar.html#fixed-size-primitive-layout)
Copy link
Contributor

Choose a reason for hiding this comment

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

the link to primitive arrays seems strange for fixed size binary, but I looked around on the docs and I didn't see any better section 🤷

arrow-array/src/array/list_array.rs Show resolved Hide resolved
arrow-array/src/array/list_array.rs Outdated Show resolved Hide resolved
arrow-array/src/array/list_array.rs Outdated Show resolved Hide resolved
arrow-array/src/array/primitive_array.rs Outdated Show resolved Hide resolved
arrow-array/src/lib.rs Outdated Show resolved Hide resolved
arrow-array/src/lib.rs Outdated Show resolved Hide resolved
arrow-array/src/lib.rs Show resolved Hide resolved
arrow-array/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

I reviewed the content in this module in its rendered form:
Screenshot 2023-05-10 at 6 29 56 PM

Love it

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @tustvold -- I went over these changes carefully and I think they are a great step forward

@alamb alamb changed the title Update docs (#4071) Update arrow rustdocs (#4071) May 10, 2023
@tustvold tustvold merged commit 378a9fc into apache:master May 11, 2023
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 development-process Related to development process of arrow-rs documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants