Invokes the inner function [`crate::HigherOrderUDFImpl::lambda_parameters`] using the arguments of this invocation. This expression lambda variables must be already resolved either by coming from the default sql planner or by calling [Expr::resolve_lambda_variables] or [LogicalPlan::resolve_lambda_variables] [LogicalPlan::resolve_lambda_variables]: crate::LogicalPlan::resolve_lambda_variables
(
&self,
schema: &dyn ExprSchema,
)
| 460 | /// |
| 461 | /// [LogicalPlan::resolve_lambda_variables]: crate::LogicalPlan::resolve_lambda_variables |
| 462 | pub fn lambda_parameters( |
| 463 | &self, |
| 464 | schema: &dyn ExprSchema, |
| 465 | ) -> Result<Vec<Vec<FieldRef>>> { |
| 466 | let args = self |
| 467 | .args |
| 468 | .iter() |
| 469 | .map(|e| match e { |
| 470 | Expr::Lambda(lambda) => { |
| 471 | Ok(ValueOrLambda::Lambda(Some(lambda.body.to_field(schema)?.1))) |
| 472 | } |
| 473 | _ => Ok(ValueOrLambda::Value(e.to_field(schema)?.1)), |
| 474 | }) |
| 475 | .collect::<Result<Vec<_>>>()?; |
| 476 | |
| 477 | let coerced_fields = |
| 478 | value_fields_with_higher_order_udf(&args, self.func.as_ref())?; |
| 479 | |
| 480 | match self.func.lambda_parameters(0, &coerced_fields)? { |
| 481 | LambdaParametersProgress::Partial(_) => plan_err!( |
| 482 | "{} lambda_parameters returned a partial result when the return type of all it's lambdas were provided", |
| 483 | self.name() |
| 484 | ), |
| 485 | LambdaParametersProgress::Complete(items) => Ok(items), |
| 486 | } |
| 487 | } |
| 488 | } |
| 489 | |
| 490 | impl Hash for HigherOrderFunction { |