pub trait AsyncExpression: ExpressionInfo {
// Required method
fn eval_row<'a>(
&'a self,
input: &'a OwnedRow,
) -> impl Future<Output = Result<Datum>> + Send + 'a;
// Provided methods
fn eval<'a>(
&'a self,
input: &'a DataChunk,
) -> impl Future<Output = Result<ArrayRef>> + Send + 'a { ... }
fn eval_v2<'a>(
&'a self,
input: &'a DataChunk,
) -> impl Future<Output = Result<ValueImpl>> + Send + 'a { ... }
}Expand description
Interface of an asynchronous expression.
Required Methods§
Provided Methods§
Sourcefn eval<'a>(
&'a self,
input: &'a DataChunk,
) -> impl Future<Output = Result<ArrayRef>> + Send + 'a
fn eval<'a>( &'a self, input: &'a DataChunk, ) -> impl Future<Output = Result<ArrayRef>> + Send + 'a
Evaluate the expression in vectorized execution. Returns an array.
The default implementation calls eval_v2 and always converts the result to an array.
Sourcefn eval_v2<'a>(
&'a self,
input: &'a DataChunk,
) -> impl Future<Output = Result<ValueImpl>> + Send + 'a
fn eval_v2<'a>( &'a self, input: &'a DataChunk, ) -> impl Future<Output = Result<ValueImpl>> + Send + 'a
Evaluate the expression in vectorized execution. Returns a value that can be either an array, or a scalar if all values in the array are the same.
The default implementation calls eval and puts the result into the Array variant.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".