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 vortex_session::registry::Id;
10
11mod accumulator;
12pub use accumulator::*;
13
14mod satisfaction;
15pub use satisfaction::*;
16
17mod accumulator_grouped;
18pub use accumulator_grouped::*;
19
20mod vtable;
21pub use vtable::*;
22
23mod plugin;
24pub use plugin::*;
25
26mod foreign;
27pub(crate) use foreign::*;
28
29mod typed;
30pub use typed::*;
31
32mod erased;
33pub use erased::*;
34
35mod options;
36pub use options::*;
37
38pub mod combined;
39pub mod fns;
40pub mod kernels;
41pub mod proto;
42pub mod session;
43
44/// A unique identifier for an aggregate function.
45pub type AggregateFnId = Id;
46
47/// Private module to seal [`typed::DynAggregateFn`].
48mod sealed {
49    use crate::aggregate_fn::AggregateFnVTable;
50    use crate::aggregate_fn::typed::AggregateFnInner;
51
52    /// Marker trait to prevent external implementations of [`super::typed::DynAggregateFn`].
53    pub(crate) trait Sealed {}
54
55    /// This can be the **only** implementor for [`super::typed::DynAggregateFn`].
56    impl<V: AggregateFnVTable> Sealed for AggregateFnInner<V> {}
57}