vortex-array 0.68.0

Vortex in memory columnar data format
Documentation
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![cfg_attr(vortex_nightly, feature(portable_simd))]
//! Vortex crate containing core logic for encoding and memory representation of [arrays](ArrayRef).
//!
//! At the heart of Vortex are [arrays](ArrayRef).
//!
//! Arrays are typed views of memory buffers that hold [scalars](crate::scalar::Scalar). These
//! buffers can be held in a number of physical encodings to perform lightweight compression that
//! exploits the particular data distribution of the array's values.
//!
//! Every data type recognized by Vortex also has a canonical physical encoding format, which
//! arrays can be [canonicalized](Canonical) into for ease of access in compute functions.

extern crate self as vortex_array;

use std::sync::LazyLock;

pub use array::*;
pub use canonical::*;
pub use columnar::*;
pub use executor::*;
pub use hash::*;
pub use mask_future::*;
pub use metadata::*;
pub use vortex_array_macros::array_slots;
use vortex_session::VortexSession;
use vortex_session::registry::Context;

use crate::session::ArraySession;

pub mod accessor;
pub mod aggregate_fn;
#[doc(hidden)]
pub mod aliases;
mod array;
pub mod arrays;
pub mod arrow;
pub mod buffer;
pub mod builders;
pub mod builtins;
mod canonical;
mod columnar;
pub mod compute;
pub mod display;
pub mod dtype;
mod executor;
pub mod expr;
mod expression;
pub mod extension;
mod hash;
pub mod iter;
pub mod kernel;
pub mod mask;
mod mask_future;
pub mod matcher;
pub mod memory;
mod metadata;
pub mod normalize;
pub mod optimizer;
mod partial_ord;
pub mod patches;
pub mod scalar;
pub mod scalar_fn;
pub mod search_sorted;
pub mod serde;
pub mod session;
pub mod stats;
pub mod stream;
#[cfg(any(test, feature = "_test-harness"))]
pub mod test_harness;
pub mod validity;
pub mod variants;

pub mod flatbuffers {
    //! Re-exported autogenerated code from the core Vortex flatbuffer definitions.
    pub use vortex_flatbuffers::array::*;
}

// TODO(ngates): canonicalize doesn't currently take a session, therefore we cannot invoke execute
//  from the new array encodings to support back-compat for legacy encodings. So we hold a session
//  here...
pub static LEGACY_SESSION: LazyLock<VortexSession> =
    LazyLock::new(|| VortexSession::empty().with::<ArraySession>());

pub type ArrayContext = Context<ArrayPluginRef>;