Skip to main content

vortex_array/aggregate_fn/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4//! Aggregate function vtable machinery.
5//!
6//! This module contains the [`AggregateFnVTable`] trait, the [`Accumulator`] trait, and the
7//! type-erasure infrastructure for aggregate functions.
8
9use arcref::ArcRef;
10
11mod accumulator;
12pub use accumulator::*;
13
14mod accumulator_grouped;
15pub use accumulator_grouped::*;
16
17mod vtable;
18pub use vtable::*;
19
20mod plugin;
21pub use plugin::*;
22
23mod foreign;
24pub(crate) use foreign::*;
25
26mod typed;
27pub use typed::*;
28
29mod erased;
30pub use erased::*;
31
32mod options;
33pub use options::*;
34
35pub mod fns;
36pub mod kernels;
37pub mod proto;
38pub mod session;
39
40/// A unique identifier for an aggregate function.
41pub type AggregateFnId = ArcRef<str>;
42
43/// Private module to seal [`typed::DynAggregateFn`].
44mod sealed {
45    use crate::aggregate_fn::AggregateFnVTable;
46    use crate::aggregate_fn::typed::AggregateFnInner;
47
48    /// Marker trait to prevent external implementations of [`super::typed::DynAggregateFn`].
49    pub(crate) trait Sealed {}
50
51    /// This can be the **only** implementor for [`super::typed::DynAggregateFn`].
52    impl<V: AggregateFnVTable> Sealed for AggregateFnInner<V> {}
53}