Skip to main content

vortex_array/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4#![cfg_attr(vortex_nightly, feature(portable_simd))]
5//! Vortex crate containing core logic for encoding and memory representation of [arrays](ArrayRef).
6//!
7//! At the heart of Vortex are [arrays](ArrayRef).
8//!
9//! Arrays are typed views of memory buffers that hold [scalars](crate::scalar::Scalar). These
10//! buffers can be held in a number of physical encodings to perform lightweight compression that
11//! exploits the particular data distribution of the array's values.
12//!
13//! Every data type recognized by Vortex also has a canonical physical encoding format, which
14//! arrays can be [canonicalized](Canonical) into for ease of access in compute functions.
15
16use std::sync::LazyLock;
17
18pub use array::*;
19pub use canonical::*;
20pub use columnar::*;
21pub use context::*;
22pub use executor::*;
23pub use hash::*;
24pub use mask_future::*;
25pub use metadata::*;
26use vortex_session::VortexSession;
27
28use crate::session::ArraySession;
29
30pub mod accessor;
31#[doc(hidden)]
32pub mod aliases;
33mod array;
34pub mod arrays;
35pub mod arrow;
36pub mod buffer;
37pub mod builders;
38pub mod builtins;
39mod canonical;
40mod columnar;
41pub mod compute;
42mod context;
43pub mod display;
44mod executor;
45pub mod expr;
46mod expression;
47mod hash;
48pub mod iter;
49pub mod kernel;
50pub mod mask;
51mod mask_future;
52pub mod matcher;
53mod metadata;
54pub mod normalize;
55pub mod optimizer;
56mod partial_ord;
57pub mod patches;
58pub mod scalar;
59pub mod search_sorted;
60pub mod serde;
61pub mod session;
62pub mod stats;
63pub mod stream;
64#[cfg(any(test, feature = "_test-harness"))]
65pub mod test_harness;
66pub mod validity;
67pub mod variants;
68pub mod vtable;
69
70pub mod flatbuffers {
71    //! Re-exported autogenerated code from the core Vortex flatbuffer definitions.
72    pub use vortex_flatbuffers::array::*;
73}
74
75// TODO(ngates): canonicalize doesn't currently take a session, therefore we cannot invoke execute
76//  from the new array encodings to support back-compat for legacy encodings. So we hold a session
77//  here...
78pub static LEGACY_SESSION: LazyLock<VortexSession> =
79    LazyLock::new(|| VortexSession::empty().with::<ArraySession>());