Skip to main content

uqa_engine/
functions.rs

1//
2// Unified Query Algebra
3//
4// Copyright (c) 2023-2026 Cognica, Inc.
5//
6
7//! Register execution-owned extension contracts in the engine.
8
9pub use uqa_execution::functions::*;
10
11impl uqa_sql::plan::AggregateClassifier for crate::Engine {
12    fn is_registered_aggregate(&self, name: &str) -> bool {
13        self.has_registered_aggregate_function(name)
14    }
15
16    fn is_registered_aggregate_with_control(
17        &self,
18        name: &str,
19        control: &uqa_core::memory::ProductionControl<'_>,
20    ) -> Result<bool, uqa_sql::SQLError> {
21        self.query_runtime_view()
22            .has_aggregate_function_with_control(name, control)
23    }
24}
25
26impl uqa_execution::functions::AggregateFunctionRegistry for crate::Engine {
27    fn registered_aggregate_function(
28        &self,
29        name: &str,
30    ) -> Option<std::sync::Arc<dyn SQLAggregateFactory>> {
31        self.registered_aggregate_function(name)
32    }
33}