Skip to main content

UnionArrayExt

Trait UnionArrayExt 

Source
pub trait UnionArrayExt: TypedArrayRef<Union> {
    // Provided methods
    fn variants(&self) -> &UnionVariants { ... }
    fn type_ids(&self) -> &ArrayRef { ... }
    fn iter_children(&self) -> impl ExactSizeIterator<Item = &ArrayRef> + '_ { ... }
    fn children(&self) -> Arc<[ArrayRef]>  { ... }
    fn child(&self, index: usize) -> Option<&ArrayRef> { ... }
    fn child_by_type_id(&self, type_id: u8) -> Option<&ArrayRef> { ... }
    fn child_by_name_opt(&self, name: impl AsRef<str>) -> Option<&ArrayRef> { ... }
    fn child_by_name(&self, name: impl AsRef<str>) -> VortexResult<&ArrayRef> { ... }
}
Expand description

Accessors for a canonical sparse union array.

Provided Methods§

Source

fn variants(&self) -> &UnionVariants

The union’s variant schema.

Source

fn type_ids(&self) -> &ArrayRef

The row-aligned u8 type IDs whose nulls represent outer union nulls.

Source

fn iter_children(&self) -> impl ExactSizeIterator<Item = &ArrayRef> + '_

Iterate over sparse children in variant order.

Source

fn children(&self) -> Arc<[ArrayRef]>

Return the sparse children in variant order.

Source

fn child(&self, index: usize) -> Option<&ArrayRef>

Return a sparse child by its variant index.

Source

fn child_by_type_id(&self, type_id: u8) -> Option<&ArrayRef>

Return a sparse child selected by a data-level type ID.

Source

fn child_by_name_opt(&self, name: impl AsRef<str>) -> Option<&ArrayRef>

Return a sparse child selected by its variant name, if present.

Source

fn child_by_name(&self, name: impl AsRef<str>) -> VortexResult<&ArrayRef>

Return a sparse child selected by its variant name.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§