Skip to main content

VariantArrayExt

Trait VariantArrayExt 

Source
pub trait VariantArrayExt: TypedArrayRef<Variant> {
    // Provided methods
    fn core_storage(&self) -> &ArrayRef { ... }
    fn shredded(&self) -> Option<&ArrayRef> { ... }
}
Expand description

Accessors for canonical variant storage.

A canonical variant array keeps the full variant value for every row in core_storage and may carry a row-aligned, storage-agnostic shredded typed tree for selected paths.

core_storage is a logical DType::Variant array, not a specific physical encoding: it may be chunked, constant, or otherwise encoded. Callers must use normal array operations instead of assuming a particular slot layout. The shredded child may have any dtype; its dtype is recorded during serialization and validated by normal child deserialization.

Provided Methods§

Source

fn core_storage(&self) -> &ArrayRef

Returns the logical variant storage that preserves the full value for every row.

Source

fn shredded(&self) -> Option<&ArrayRef>

Returns the optional row-aligned typed shredded tree for selected variant paths. This functions returns Some only if the array was canonicalized and the shredded data was pulled out of the underlying variant storage.

Implementors§