Expand description
VariantArray
and compute kernels for the Variant Binary Encoding from Apache Parquet.
ยงMain APIs
VariantArray
: Represents an array ofVariant
values.VariantArrayBuilder
: For buildingVariantArray
json_to_variant
: Function to convert a batch of JSON strings to aVariantArray
.variant_to_json
: Function to convert aVariantArray
to a batch of JSON strings.cast_to_variant
: Module to cast other Arrow arrays toVariantArray
.variant_get
: Module to get values from aVariantArray
using a specifiedVariantPath
ยง๐ง Work In Progress
This crate is under active development and is not yet ready for production use. If you are interested in helping, you can find more information on the GitHub Variant issue
Re-exportsยง
pub use cast_to_variant::cast_to_variant;
pub use cast_to_variant::cast_to_variant_with_options;
Modulesยง
- arrow_
to_ ๐variant - cast_
to_ variant - from_
json ๐ - Module for transforming a batch of JSON strings into a batch of Variants represented as STRUCT<metadata: BINARY, value: BINARY>
- shred_
variant ๐ - Module for shredding VariantArray with a given schema.
- to_json ๐
- Module for transforming a batch of Variants represented as STRUCT<metadata: BINARY, value: BINARY> into a batch of JSON strings.
- type_
conversion ๐ - Module for transforming a typed arrow
Array
toVariantArray
. - unshred_
variant ๐ - Module for unshredding VariantArray by folding typed_value columns back into the value column.
- variant_
array ๐ VariantArray
implementation- variant_
array_ ๐builder VariantArrayBuilder
implementation- variant_
get - variant_
to_ ๐arrow
Structsยง
- Borrowed
Shredding State - Similar to
ShreddingState
except it holds borrowed references of the target arrays. Useful for avoiding clone operations when the caller does not need a self-standing shredding state. - Cast
Options - Options for controlling the behavior of
cast_to_variant_with_options
. - Shredding
State - Represents the shredding state of a
VariantArray
- Variant
Array - An array of Parquet [
Variant
] values - Variant
Array Builder - A builder for
VariantArray
- Variant
Type - Arrow Variant [
ExtensionType
]. - Variant
Value Array Builder - A builder for creating only the value column of a
VariantArray
Functionsยง
- json_
to_ variant - Parse a batch of JSON strings into a batch of Variants represented as STRUCT<metadata: BINARY, value: BINARY> where nulls are preserved. The JSON strings in the input must be valid.
- shred_
variant - Shreds the input binary variant using a target shredding schema derived from the requested data type.
- unshred_
variant - Removes all (nested) typed_value columns from a VariantArray by converting them back to binary variant and merging the resulting values back into the value column.
- variant_
to_ json - Transform a batch of Variant represented as STRUCT<metadata: BINARY, value: BINARY> to a batch of JSON strings where nulls are preserved. The JSON strings in the input must be valid.