vortex_array/arrays/struct_/vtable/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4use crate::arrays::struct_::StructArray;
5use crate::vtable::{NotSupported, VTable, ValidityVTableFromValidityHelper};
6use crate::{EncodingId, EncodingRef, vtable};
7
8mod array;
9mod canonical;
10mod operations;
11mod pipeline;
12mod serde;
13mod validity;
14mod visitor;
15
16vtable!(Struct);
17
18impl VTable for StructVTable {
19    type Array = StructArray;
20    type Encoding = StructEncoding;
21
22    type ArrayVTable = Self;
23    type CanonicalVTable = Self;
24    type OperationsVTable = Self;
25    type ValidityVTable = ValidityVTableFromValidityHelper;
26    type VisitorVTable = Self;
27    type ComputeVTable = NotSupported;
28    type EncodeVTable = NotSupported;
29    type PipelineVTable = Self;
30    type SerdeVTable = Self;
31
32    fn id(_encoding: &Self::Encoding) -> EncodingId {
33        EncodingId::new_ref("vortex.struct")
34    }
35
36    fn encoding(_array: &Self::Array) -> EncodingRef {
37        EncodingRef::new_ref(StructEncoding.as_ref())
38    }
39}
40
41#[derive(Clone, Debug)]
42pub struct StructEncoding;