MCPcopy Create free account
hub / github.com/apache/datafusion / call

Method call

datafusion/expr/src/udf.rs:172–177  ·  view source on GitHub ↗

Returns a [`Expr`] logical expression to call this UDF with specified arguments. This utility allows easily calling UDFs # Example ```no_run use datafusion_expr::{col, lit, ScalarUDF}; # fn my_udf() -> ScalarUDF { unimplemented!() } let my_func: ScalarUDF = my_udf(); // Create an expr for `my_func(a, 12.3)` let expr = my_func.call(vec![col("a"), lit(12.3)]); ```

(&self, args: Vec<Expr>)

Source from the content-addressed store, hash-verified

170 /// let expr = my_func.call(vec![col("a"), lit(12.3)]);
171 /// ```
172 pub fn call(&self, args: Vec<Expr>) -> Expr {
173 Expr::ScalarFunction(crate::expr::ScalarFunction::new_udf(
174 Arc::new(self.clone()),
175 args,
176 ))
177 }
178
179 /// Returns this function's name.
180 ///

Callers 15

rewrite_exprMethod · 0.45
expr_fn_demoFunction · 0.45
plan_pivotFunction · 0.45
simple_udwfFunction · 0.45
simple_udfFunction · 0.45
advanced_udwfFunction · 0.45
roundtrip_count_distinctFunction · 0.45

Calls 3

ScalarFunctionClass · 0.85
newFunction · 0.85
cloneMethod · 0.45