Expand description
Canonical sparse union arrays.
A UnionArray stores one u8 type ID per row followed by one row-aligned child for each
variant. The type ID selects which child’s value is active for a row; values in all other
children at that row are placeholders. Outer union nulls are stored as nulls in the type IDs
child, independently of nulls in the selected variant child.
Type ID values are not validated during construction. Accessing a non-null row whose type ID is not declared by the union variants will panic.
Mask rewrites only the type IDs. Slice and take rewrite every child to keep them row-aligned,
so each costs O(variants) child operations.
Structs§
- Union
- The canonical Union encoding.
- Union
Data Parts - Concrete parts of a
UnionArray. - Union
Slots - Slot layout of a canonical sparse union array.
- Union
Slots View - Borrowed view of
UnionSlots.
Traits§
- Union
Array Ext - Accessors for a canonical sparse union array.
- Union
Array Slots Ext - Typed array accessors for
Union.
Type Aliases§
- Union
Array - A canonical
Union-encoded array.