Skip to main content

Crate parquet_variant_compute

Crate parquet_variant_compute 

Source
Expand description

VariantArray and compute kernels for the Variant Binary Encoding from Apache Parquet.

§Main APIs

§Compute Kernels

§🚧 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.

Structs§

GetOptions
Controls the action of the variant_get kernel.
ShreddedSchemaBuilder
Builder for constructing a variant shredding schema.
ShreddingState
Represents the shredding state of a VariantArray
VariantArray
An array of Parquet Variant values
VariantArrayBuilder
A builder for VariantArray
VariantArrayIter
An iterator over VariantArray
VariantType
Arrow Variant ExtensionType.
VariantValueArrayBuilder
A builder for creating only the value column of a VariantArray

Traits§

IntoShreddingField
Convenience conversion to allow passing either FieldRef, DataType, or (DataType, bool).

Functions§

cast_to_variant
Convert an array to a VariantArray with strict mode enabled (returns errors on conversion failures).
cast_to_variant_with_options
Casts a typed arrow Array to a VariantArray. This is useful when you need to convert a specific data type
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_get
Returns an array with the specified path extracted from the variant values.
variant_to_json
Transform a VariantArray to a batch of JSON strings where nulls are preserved.