pub trait AsyncScalarUDFImpl: ScalarUDFImpl {
// Required method
fn invoke_async_with_args<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ScalarFunctionArgs,
option: &'life1 ConfigOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayRef>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn ideal_batch_size(&self) -> Option<usize> { ... }
}
Expand description
A scalar UDF that can invoke using async methods
Note this is less efficient than the ScalarUDFImpl, but it can be used to register remote functions in the context.
The name is chosen to mirror ScalarUDFImpl
Required Methods§
Sourcefn invoke_async_with_args<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ScalarFunctionArgs,
option: &'life1 ConfigOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayRef>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn invoke_async_with_args<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ScalarFunctionArgs,
option: &'life1 ConfigOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayRef>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Invoke the function asynchronously with the async arguments
Provided Methods§
Sourcefn ideal_batch_size(&self) -> Option<usize>
fn ideal_batch_size(&self) -> Option<usize>
The ideal batch size for this function.
This is used to determine what size of data to be evaluated at once. If None, the whole batch will be evaluated at once.