pub trait Function: Send + Sync {
// Required methods
fn info(&self) -> &FunctionInfo;
fn capabilities(&self) -> &[FunctionCapability];
fn return_type(&self, input_types: &[Type]) -> Type;
fn execute(
&self,
ctx: &FunctionContext<'_>,
args: &Columns,
) -> Result<Columns, FunctionError>;
// Provided methods
fn accepted_types(&self) -> InputTypes { ... }
fn propagates_options(&self) -> bool { ... }
fn call(
&self,
ctx: &FunctionContext<'_>,
args: &Columns,
) -> Result<Columns, FunctionError> { ... }
fn accumulator(
&self,
_ctx: &FunctionContext<'_>,
) -> Option<Box<dyn Accumulator>> { ... }
}Required Methods§
fn info(&self) -> &FunctionInfo
fn capabilities(&self) -> &[FunctionCapability]
fn return_type(&self, input_types: &[Type]) -> Type
fn execute( &self, ctx: &FunctionContext<'_>, args: &Columns, ) -> Result<Columns, FunctionError>
Provided Methods§
fn accepted_types(&self) -> InputTypes
fn propagates_options(&self) -> bool
Sourcefn call(
&self,
ctx: &FunctionContext<'_>,
args: &Columns,
) -> Result<Columns, FunctionError>
fn call( &self, ctx: &FunctionContext<'_>, args: &Columns, ) -> Result<Columns, FunctionError>
Calls the function, automatically propagating Option columns if
propagates_options() returns true.