Expand description
VariantArray and compute kernels for the Variant Binary Encoding from Apache Parquet.
ยงMain APIs
VariantArray: Represents an array ofVariantvalues.VariantArrayBuilder: For buildingVariantArray
ยงCompute Kernels
json_to_variant(): Function to convert Arrays of JSON strings to aVariantArray.variant_to_json(): Function to convert aVariantArrayto arrays of JSON strings.cast_to_variant(): Cast Arrow arrays toVariantArray.variant_get(): ConvertVariantArray(or an inner path) to a strongly-typed Arrow array.shred_variant(): Shred aVariantArrayaccording to the provided shredding schemaunshred_variant(): Unshred aVariantArrayto pure binary variant.
ยง๐ง 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
ยงPlatform Support
Only little-endian platforms are officially supported and tested in CI. Big-endian platforms are not tested in CI and may not work correctly. Fixes for big-endian platforms are welcome and handled on a best-effort basis, but compatibility is not guaranteed.
Re-exportsยง
pub use variant_array::ShreddingState;pub use variant_array::VariantArray;pub use variant_array::VariantArrayIter;pub use variant_array_builder::VariantArrayBuilder;pub use variant_array_builder::VariantValueArrayBuilder;pub use cast_to_variant::cast_to_variant;pub use cast_to_variant::cast_to_variant_with_options;pub use from_json::json_to_variant;pub use shred_variant::IntoShreddingField;pub use shred_variant::ShreddedSchemaBuilder;pub use shred_variant::shred_variant;pub use to_json::variant_to_json;pub use unshred_variant::unshred_variant;pub use variant_get::GetOptions;pub use variant_get::variant_get;
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 into JSON strings.
- type_
conversion ๐ - Module for transforming a typed arrow
ArraytoVariantArray. - unshred_
variant ๐ - Module for unshredding VariantArray by folding typed_value columns back into the value column.
- variant_
array ๐ VariantArrayimplementation- variant_
array_ ๐builder VariantArrayBuilderimplementation- variant_
get ๐ - variant_
to_ ๐arrow
Structsยง
- Variant
Type - Arrow Variant [
ExtensionType].