vortex_array/arrays/struct_/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::struct_::{StructArray, StructVTable};
7use crate::stats::StatsSetRef;
8use crate::vtable::ArrayVTable;
9
10impl ArrayVTable<StructVTable> for StructVTable {
11 fn len(array: &StructArray) -> usize {
12 array.len
13 }
14
15 fn dtype(array: &StructArray) -> &DType {
16 &array.dtype
17 }
18
19 fn stats(array: &StructArray) -> StatsSetRef<'_> {
20 array.stats_set.to_ref(array.as_ref())
21 }
22}