1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors
//! 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.
use crateDType;
use crateNullability;
use cratePType;
pub use UnionArrayExt;
pub use UnionArraySlotsExt;
pub use UnionDataParts;
pub use UnionSlots;
pub use UnionSlotsView;
pub use UnionArray;
pub
pub use Union;
pub