Convenience method to create a new user defined scalar function (UDF) with a specific signature and specific return type. Note this function does not expose all available features of [`ScalarUDF`], such as computing return types based on input types multiple [`Signature`]s aliases See [`ScalarUDF`] for details and examples on how to use the full functionality.
(
name: &str,
input_types: Vec<DataType>,
return_type: DataType,
volatility: Volatility,
fun: ScalarFunctionImplementation,
)
| 406 | /// See [`ScalarUDF`] for details and examples on how to use the full |
| 407 | /// functionality. |
| 408 | pub fn create_udf( |
| 409 | name: &str, |
| 410 | input_types: Vec<DataType>, |
| 411 | return_type: DataType, |
| 412 | volatility: Volatility, |
| 413 | fun: ScalarFunctionImplementation, |
| 414 | ) -> ScalarUDF { |
| 415 | ScalarUDF::from(SimpleScalarUDF::new( |
| 416 | name, |
| 417 | input_types, |
| 418 | return_type, |
| 419 | volatility, |
| 420 | fun, |
| 421 | )) |
| 422 | } |
| 423 | |
| 424 | /// Implements [`ScalarUDFImpl`] for functions that have a single signature and |
| 425 | /// return type. |
searching dependent graphs…