Expand description
VariantArray
implementation
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. - Shredded
Variant Field Array - One shredded field of a partially or prefectly shredded variant. For example, suppose the
shredding schema for variant
v
treats it as an object with a single fielda
, wherea
is itself a struct with the single fieldb
of 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
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
- is_
valid_ πvariant_ decimal - Validates whether a given arrow decimal is a valid variant decimal
- typed_
value_ πto_ variant - returns the non-null element at index as a Variant