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

Add Rust Docs examples for UnionArray #1241

Merged

Conversation

HaoYang670
Copy link
Contributor

Signed-off-by: remzi [email protected]

Which issue does this PR close?

Closes #751

Rationale for this change

Add 2 docs examples of building UnionArray using the function UnionArray::try_new,
so that users can easily understand the data structure of UnionArray.

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 Jan 26, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1241 (ff23910) into master (7949298) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1241      +/-   ##
==========================================
- Coverage   82.94%   82.94%   -0.01%     
==========================================
  Files         178      178              
  Lines       51420    51420              
==========================================
- Hits        42651    42650       -1     
- Misses       8769     8770       +1     
Impacted Files Coverage Δ
arrow/src/array/array_union.rs 90.76% <ø> (ø)
arrow/src/datatypes/datatype.rs 66.38% <0.00%> (-0.43%) ⬇️
arrow/src/array/transform/mod.rs 84.51% <0.00%> (-0.13%) ⬇️
parquet_derive/src/parquet_field.rs 66.21% <0.00%> (+0.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7949298...ff23910. Read the comment docs.

Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

This looks good to me 👍

@alamb alamb added the documentation Improvements or additions to documentation label Jan 26, 2022
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 very much for the contribution @HaoYang670

/// None,
/// ).unwrap();
///
/// let value = array.value(0).as_any().downcast_ref::<Int32Array>().unwrap().value(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

It isn't the nicest API in the world, is it ?

However, documenting what we have is 👍

Thank you @HaoYang670

@alamb alamb merged commit 02573e9 into apache:master Jan 27, 2022
@matthewmturner
Copy link
Contributor

thank you @HaoYang670

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.

Add examples to Rust Docs for arrow::array::UnionArray
5 participants