vortex_array/arrays/masked/vtable/array.rs
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4use vortex_dtype::DType;
5
6use crate::arrays::masked::{MaskedArray, MaskedVTable};
7use crate::stats::StatsSetRef;
8use crate::vtable::ArrayVTable;
9
10impl ArrayVTable<MaskedVTable> for MaskedVTable {
11 fn len(array: &MaskedArray) -> usize {
12 array.child.len()
13 }
14
15 fn dtype(array: &MaskedArray) -> &DType {
16 &array.dtype
17 }
18
19 fn stats(array: &MaskedArray) -> StatsSetRef<'_> {
20 array.stats.to_ref(array.as_ref())
21 }
22}