pub trait AsyncFunction:
Display
+ Sync
+ Send {
// Required methods
fn name(&self) -> &str;
fn return_type(
&self,
input_types: &[ConcreteDataType],
) -> Result<ConcreteDataType>;
fn signature(&self) -> Signature;
fn eval<'life0, 'life1, 'async_trait>(
&'life0 self,
_func_ctx: FunctionContext,
_columns: &'life1 [VectorRef],
) -> Pin<Box<dyn Future<Output = Result<VectorRef>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Async Scalar function trait
Required Methods§
sourcefn return_type(
&self,
input_types: &[ConcreteDataType],
) -> Result<ConcreteDataType>
fn return_type( &self, input_types: &[ConcreteDataType], ) -> Result<ConcreteDataType>
The returned data type of function execution.
sourcefn eval<'life0, 'life1, 'async_trait>(
&'life0 self,
_func_ctx: FunctionContext,
_columns: &'life1 [VectorRef],
) -> Pin<Box<dyn Future<Output = Result<VectorRef>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn eval<'life0, 'life1, 'async_trait>(
&'life0 self,
_func_ctx: FunctionContext,
_columns: &'life1 [VectorRef],
) -> Pin<Box<dyn Future<Output = Result<VectorRef>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Evaluate the function, e.g. run/execute the function. TODO(dennis): simplify the signature and refactor all the admin functions.