vortex_array/arrays/extension/vtable/
mod.rs

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