-
Notifications
You must be signed in to change notification settings - Fork 1k
[Variant] Improve documentation and make kernels consistent #8536
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
Changes from all commits
4c4a3e4
172cf45
d6d3d1a
da8bd04
04ae125
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ use arrow_schema::ArrowError; | |
/// ``` | ||
/// # use arrow::array::{Array, ArrayRef, Int64Array}; | ||
/// # use parquet_variant::Variant; | ||
/// # use parquet_variant_compute::cast_to_variant::cast_to_variant; | ||
/// # use parquet_variant_compute::cast_to_variant; | ||
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. likewise, I removed this extra level of namespacing |
||
/// // input is an Int64Array, which will be cast to a VariantArray | ||
/// let input = Int64Array::from(vec![Some(1), None, Some(3)]); | ||
/// let result = cast_to_variant(&input).unwrap(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,11 @@ | |
//! Note: Requires the `variant_experimental` feature of the `parquet` crate to be enabled. | ||
//! | ||
//! # Features | ||
//! * [`Variant`] represents variant value, which can be an object, list, or primitive. | ||
//! * [`VariantBuilder`] for building `Variant` values. | ||
//! * [`VariantArray`] for representing a column of Variant values. | ||
//! * [`json_to_variant`] and [`variant_to_json`] for converting to/from JSON. | ||
//! * [`cast_to_variant()`] for casting other Arrow arrays to `VariantArray`. | ||
//! * [`VariantType`] Arrow ExtensionType for Parquet Variant logical type. | ||
//! [`variant_get`] to extracting a value by path and functions to convert | ||
//! between `Variant` and JSON. | ||
//! * Representation of [`Variant`], and [`VariantArray`] for working with | ||
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. this was largely a copy of what was in parquet_variant and parquet_variant_compute so I changed the docs to highlight the most important functions and structures and link to the rest of the docs |
||
//! Variant values (see [`parquet_variant`] for more details) | ||
//! * Kernels for working with arrays of Variant values | ||
//! such as conversion between `Variant` and JSON, and shredding/unshredding | ||
//! (see [`parquet_variant_compute`] for more details) | ||
//! | ||
//! # Example: Writing a Parquet file with Variant column | ||
//! ```rust | ||
|
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 moved all the functions into the main parquet_variant_compute module