mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-14 17:23:09 +00:00
* feat: Remove usage of opaque error from common::recordbatch * feat: Remove opaque error from common::query * feat: Fix diff compiler errors Now common_function just use common_query's Error and Result. Adds a LargestType associated type to LogicalPrimitiveType to get the largest type a logical primitive type can cast to. * feat: Remove LargestType from NativeType trait * chore: Update comments * feat: Restrict Scalar::RefType of WrapperType to itself Add trait bound `for<'a> Scalar<RefType<'a> = Self>` to WrapperType * chore: Address CR comments * chore: Format codes
33 lines
975 B
Rust
33 lines
975 B
Rust
// Copyright 2022 Greptime Team
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
mod pow;
|
|
mod rate;
|
|
|
|
use std::sync::Arc;
|
|
|
|
pub use pow::PowFunction;
|
|
pub use rate::RateFunction;
|
|
|
|
use crate::scalars::function_registry::FunctionRegistry;
|
|
|
|
pub(crate) struct MathFunction;
|
|
|
|
impl MathFunction {
|
|
pub fn register(registry: &FunctionRegistry) {
|
|
registry.register(Arc::new(PowFunction::default()));
|
|
registry.register(Arc::new(RateFunction::default()))
|
|
}
|
|
}
|