vortex_array/arrays/bool/
mod.rs

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