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