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Β§
- binary_
array_ πvalue - Returns the raw bytes at the given index from a binary-like array, return
Noneif the array isnβt binary-like. - 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 narrows decimal types to the smallest valid precision (e.g. Decimal128 -> Decimal32 when the precision fits).
- canonicalize_
and_ πverify_ field - canonicalize_
shredded_ πtypes - Canonicalize shredded typed_value fields (e.g. decimal narrowing) and verify that all data types in the struct are legal for a variant array.
- typed_
value_ πto_ variant - returns the non-null element at index as a Variant
- validate_
binary_ πarray - Validates that an array has a binary-like data type.
- variant_
from_ πarrays_ at - Returns a [
Variant] from ametadataandvaluebyte arrays, returnsNoneif one of them is of invalid type.