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

Method only_expr

datafusion/expr/src/logical_plan/plan.rs:1194–1202  ·  view source on GitHub ↗
(&self, mut expr: Vec<Expr>)

Source from the content-addressed store, hash-verified

1192 /// Helper for [Self::with_new_exprs] to use when exactly one expression is expected.
1193 #[inline]
1194 fn only_expr(&self, mut expr: Vec<Expr>) -> Result<Expr> {
1195 assert_eq_or_internal_err!(
1196 expr.len(),
1197 1,
1198 "{self:?} should have exactly one expr, got {:?}",
1199 &expr
1200 );
1201 Ok(expr.remove(0))
1202 }
1203
1204 /// Helper for [Self::with_new_exprs] to use when exactly one input is expected.
1205 #[inline]

Callers 1

with_new_exprsMethod · 0.80

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected