-
Notifications
You must be signed in to change notification settings - Fork 1k
[Variant] Improve documentation and includes for casts #8532
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,10 +20,14 @@ | |
//! ## Main APIs | ||
//! - [`VariantArray`] : Represents an array of `Variant` values. | ||
//! - [`VariantArrayBuilder`]: For building [`VariantArray`] | ||
//! - [`json_to_variant`]: Function to convert a batch of JSON strings to a `VariantArray`. | ||
//! - [`variant_to_json`]: Function to convert a `VariantArray` to a batch of JSON strings. | ||
//! - [`mod@cast_to_variant`]: Module to cast other Arrow arrays to `VariantArray`. | ||
//! - [`variant_get`]: Module to get values from a `VariantArray` using a specified [`VariantPath`] | ||
//! | ||
//! # Compute Kernels | ||
//! - [`json_to_variant`]: Function to convert a Arrays of JSON strings to a `VariantArray`. | ||
//! - [`variant_to_json`]: Function to convert a `VariantArray` to Arrays of JSON strings. | ||
//! - [`cast_to_variant`]: Cast Arrow arrays to `VariantArray`. | ||
//! - [`variant_get`]: Convert `VariantArray` (or an inner path) to ArrowArrays type | ||
//! - [`shred_variant`]: Shred a `VariantArray` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added mention of shred and unshred |
||
//! - [`unshred_variant`]: Unshred a `VariantArray`. | ||
//! | ||
//! ## 🚧 Work In Progress | ||
//! | ||
|
@@ -36,23 +40,24 @@ | |
//! [Variant issue]: https://github.com/apache/arrow-rs/issues/6736 | ||
mod arrow_to_variant; | ||
pub mod cast_to_variant; | ||
mod cast; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's keep it consistent and not have |
||
mod from_json; | ||
mod shred_variant; | ||
mod to_json; | ||
mod type_conversion; | ||
mod unshred_variant; | ||
mod variant_array; | ||
mod variant_array_builder; | ||
pub mod variant_get; | ||
mod variant_get; | ||
mod variant_to_arrow; | ||
|
||
pub use variant_array::{BorrowedShreddingState, ShreddingState, VariantArray, VariantType}; | ||
pub use variant_array_builder::{VariantArrayBuilder, VariantValueArrayBuilder}; | ||
|
||
pub use cast_to_variant::{cast_to_variant, cast_to_variant_with_options}; | ||
pub use cast::{cast_to_variant, cast_to_variant_with_options}; | ||
pub use from_json::json_to_variant; | ||
pub use shred_variant::shred_variant; | ||
pub use to_json::variant_to_json; | ||
pub use type_conversion::CastOptions; | ||
pub use unshred_variant::unshred_variant; | ||
pub use variant_get::{variant_get, GetOptions}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed this module
cast
so that it doesn't have the same name as the functioncast_to_variant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but then it doesn't match the convention of
shred_variant
andunshred_variant
🤔