Expand description
VariantArray implementation
StructsΒ§
- Borrowed
Shredding State - Similar to
ShreddingStateexcept it holds borrowed references of the target arrays. Useful for avoiding clone operations when the caller does not need a self-standing shredding state. - Shredded
Variant Field Array - One shredded field of a partially or perfectly shredded variant. For example, suppose the
shredding schema for variant
vtreats it as an object with a single fielda, whereais itself a struct with the single fieldbof type INT. Then the physical layout of the column is: - Shredding
State - Represents the shredding state of a
VariantArray - Struct
Array πBuilder - Builds struct arrays from component fields
- Variant
Array - An array of Parquet [
Variant] values - Variant
Array Iter - An iterator over
VariantArray - Variant
Type - Arrow Variant [
ExtensionType].
FunctionsΒ§
- canonicalize_
and_ πverify_ data_ type - Recursively visits a data type, ensuring that it only contains data types that can legally appear in a (possibly shredded) variant array. It also replaces Binary fields with BinaryView, since thatβs what comes back from the parquet reader and what the variant code expects to find.
- canonicalize_
and_ πverify_ field - cast_
to_ πbinary_ view_ arrays - Workaround for lack of direct support for BinaryArray https://github.com/apache/arrow-rs/issues/8387
- typed_
value_ πto_ variant - returns the non-null element at index as a Variant