vortex_array/arrays/masked/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 serde;
8mod validity;
9
10use crate::arrays::masked::MaskedArray;
11use crate::vtable::{NotSupported, VTable, ValidityVTableFromValidityHelper};
12use crate::{EncodingId, EncodingRef, vtable};
13
14vtable!(Masked);
15
16#[derive(Clone, Debug)]
17pub struct MaskedEncoding;
18
19impl VTable for MaskedVTable {
20    type Array = MaskedArray;
21    type Encoding = MaskedEncoding;
22
23    type ArrayVTable = Self;
24    type CanonicalVTable = Self;
25    type OperationsVTable = Self;
26    type ValidityVTable = ValidityVTableFromValidityHelper;
27    type VisitorVTable = Self;
28    type ComputeVTable = NotSupported;
29    type EncodeVTable = NotSupported;
30    type SerdeVTable = Self;
31    type PipelineVTable = NotSupported;
32
33    fn id(_encoding: &Self::Encoding) -> EncodingId {
34        EncodingId::new_ref("vortex.masked")
35    }
36
37    fn encoding(_array: &Self::Array) -> EncodingRef {
38        EncodingRef::new_ref(MaskedEncoding.as_ref())
39    }
40}