common_query::logical_plan

Function create_udf

source
pub fn create_udf(
    name: &str,
    input_types: Vec<ConcreteDataType>,
    return_type: Arc<ConcreteDataType>,
    volatility: Volatility,
    fun: ScalarFunctionImplementation,
) -> ScalarUdf
Expand description

Creates a new UDF with a specific signature and specific return type. This is a helper function to create a new UDF. The function create_udf returns a subset of all possible ScalarFunction:

  • the UDF has a fixed return type
  • the UDF has a fixed signature (e.g. [f64, f64])