Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
create_udf in datafusion::logical_expr - Rust
[go: Go Back, main page]

datafusion::logical_expr

Function create_udf

source
pub fn create_udf(
    name: &str,
    input_types: Vec<DataType>,
    return_type: Arc<DataType>,
    volatility: Volatility,
    fun: Arc<dyn Fn(&[ColumnarValue]) -> Result<ColumnarValue, DataFusionError> + Sync + Send>,
) -> ScalarUDF
Expand description

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 Signatures
  • aliases

See ScalarUDF for details and examples on how to use the full functionality.