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

Method try_new

datafusion/physical-expr/src/expressions/lambda.rs:64–75  ·  view source on GitHub ↗

Create a new lambda expression with the given parameters and body

(params: Vec<String>, body: Arc<dyn PhysicalExpr>)

Source from the content-addressed store, hash-verified

62impl LambdaExpr {
63 /// Create a new lambda expression with the given parameters and body
64 pub fn try_new(params: Vec<String>, body: Arc<dyn PhysicalExpr>) -> Result<Self> {
65 if !all_unique(&params) {
66 return plan_err!(
67 "lambda params must be unique, got ({})",
68 params.join(", ")
69 );
70 }
71
72 check_async_udf(&body)?;
73
74 Ok(Self::new(params, body))
75 }
76
77 fn new(params: Vec<String>, body: Arc<dyn PhysicalExpr>) -> Self {
78 let mut used_column_indices = HashSet::new();

Callers

nothing calls this directly

Calls 3

check_async_udfFunction · 0.85
newFunction · 0.85
all_uniqueFunction · 0.70

Tested by

no test coverage detected