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

Method with_new_children

datafusion/physical-expr/src/expressions/lambda.rs:177–191  ·  view source on GitHub ↗
(
        self: Arc<Self>,
        children: Vec<Arc<dyn PhysicalExpr>>,
    )

Source from the content-addressed store, hash-verified

175 }
176
177 fn with_new_children(
178 self: Arc<Self>,
179 children: Vec<Arc<dyn PhysicalExpr>>,
180 ) -> Result<Arc<dyn PhysicalExpr>> {
181 let [body] = children.as_slice() else {
182 return internal_err!(
183 "LambdaExpr expects exactly 1 child, got {}",
184 children.len()
185 );
186 };
187
188 check_async_udf(body)?;
189
190 Ok(Arc::new(Self::new(self.params.clone(), Arc::clone(body))))
191 }
192
193 fn fmt_sql(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
194 write!(f, "({}) -> {}", self.params.join(", "), self.body)

Callers

nothing calls this directly

Calls 3

check_async_udfFunction · 0.85
newFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected