vortex_array/arrays/bool/
mod.rs

1mod array;
2pub mod compute;
3mod ops;
4mod patch;
5mod serde;
6
7pub use array::*;
8// Re-export the BooleanBuffer type on our API surface.
9pub use arrow_buffer::{BooleanBuffer, BooleanBufferBuilder};
10
11use crate::vtable::{NotSupported, VTable, ValidityVTableFromValidityHelper};
12use crate::{EncodingId, EncodingRef, vtable};
13
14vtable!(Bool);
15
16impl VTable for BoolVTable {
17    type Array = BoolArray;
18    type Encoding = BoolEncoding;
19
20    type ArrayVTable = Self;
21    type CanonicalVTable = Self;
22    type OperationsVTable = Self;
23    type ValidityVTable = ValidityVTableFromValidityHelper;
24    type VisitorVTable = Self;
25    type ComputeVTable = NotSupported;
26    type EncodeVTable = NotSupported;
27    // Enable serde for this encoding
28    type SerdeVTable = Self;
29
30    fn id(_encoding: &Self::Encoding) -> EncodingId {
31        EncodingId::new_ref("vortex.bool")
32    }
33
34    fn encoding(_array: &Self::Array) -> EncodingRef {
35        EncodingRef::new_ref(BoolEncoding.as_ref())
36    }
37}
38
39#[derive(Clone, Debug)]
40pub struct BoolEncoding;