pub trait Function:
Display
+ Sync
+ Send {
// Required methods
fn name(&self) -> &str;
fn return_type(&self, input_types: &[DataType]) -> Result<DataType>;
fn signature(&self) -> &Signature;
fn invoke_with_args(
&self,
args: ScalarFunctionArgs,
) -> Result<ColumnarValue>;
// Provided method
fn aliases(&self) -> &[String] { ... }
}
Expand description
Scalar function trait, modified from databend to adapt datafusion TODO(dennis): optimize function by it’s features such as monotonicity etc.
Required Methods§
Sourcefn return_type(&self, input_types: &[DataType]) -> Result<DataType>
fn return_type(&self, input_types: &[DataType]) -> Result<DataType>
The returned data type of function execution.