vortex_array/arrays/primitive/vtable/
mod.rs1use crate::arrays::PrimitiveArray;
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!(Primitive);
17
18impl VTable for PrimitiveVTable {
19 type Array = PrimitiveArray;
20 type Encoding = PrimitiveEncoding;
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.primitive")
34 }
35
36 fn encoding(_array: &Self::Array) -> EncodingRef {
37 EncodingRef::new_ref(PrimitiveEncoding.as_ref())
38 }
39}
40
41#[derive(Clone, Debug)]
42pub struct PrimitiveEncoding;