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;
44pub mod dtype;
45mod executor;
46pub mod expr;
47mod expression;
48pub mod extension;
49mod hash;
50pub mod iter;
51pub mod kernel;
52pub mod mask;
53mod mask_future;
54pub mod matcher;
55mod metadata;
56pub mod normalize;
57pub mod optimizer;
58mod partial_ord;
59pub mod patches;
60pub mod scalar;
61pub mod scalar_fn;
62pub mod search_sorted;
63pub mod serde;
64pub mod session;
65pub mod stats;
66pub mod stream;
67#[cfg(any(test, feature = "_test-harness"))]
68pub mod test_harness;
69pub mod validity;
70pub mod variants;
71pub mod vtable;
72
73pub mod flatbuffers {
74    //! Re-exported autogenerated code from the core Vortex flatbuffer definitions.
75    pub use vortex_flatbuffers::array::*;
76}
77
78// TODO(ngates): canonicalize doesn't currently take a session, therefore we cannot invoke execute
79//  from the new array encodings to support back-compat for legacy encodings. So we hold a session
80//  here...
81pub static LEGACY_SESSION: LazyLock<VortexSession> =
82    LazyLock::new(|| VortexSession::empty().with::<ArraySession>());