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 typed;
24pub use typed::*;
25
26mod erased;
27pub use erased::*;
28
29mod options;
30pub use options::*;
31
32pub mod fns;
33pub mod kernels;
34pub mod session;
35
36/// A unique identifier for an aggregate function.
37pub type AggregateFnId = ArcRef<str>;
38
39/// Private module to seal [`typed::DynAggregateFn`].
40mod sealed {
41    use crate::aggregate_fn::AggregateFnVTable;
42    use crate::aggregate_fn::typed::AggregateFnInner;
43
44    /// Marker trait to prevent external implementations of [`super::typed::DynAggregateFn`].
45    pub(crate) trait Sealed {}
46
47    /// This can be the **only** implementor for [`super::typed::DynAggregateFn`].
48    impl<V: AggregateFnVTable> Sealed for AggregateFnInner<V> {}
49}