(
ecx: &ExprContext,
function: &HomogenizingFunction,
exprs: &[Expr<Aug>],
)
| 4274 | } |
| 4275 | |
| 4276 | fn plan_homogenizing_function( |
| 4277 | ecx: &ExprContext, |
| 4278 | function: &HomogenizingFunction, |
| 4279 | exprs: &[Expr<Aug>], |
| 4280 | ) -> Result<CoercibleScalarExpr, PlanError> { |
| 4281 | assert!(!exprs.is_empty()); // `COALESCE()` is a syntax error |
| 4282 | let expr = HirScalarExpr::call_variadic( |
| 4283 | match function { |
| 4284 | HomogenizingFunction::Coalesce => VariadicFunc::from(Coalesce), |
| 4285 | HomogenizingFunction::Greatest => VariadicFunc::from(Greatest), |
| 4286 | HomogenizingFunction::Least => VariadicFunc::from(Least), |
| 4287 | }, |
| 4288 | coerce_homogeneous_exprs( |
| 4289 | &ecx.with_name(&function.to_string().to_lowercase()), |
| 4290 | plan_exprs(ecx, exprs)?, |
| 4291 | None, |
| 4292 | )?, |
| 4293 | ); |
| 4294 | Ok(expr.into()) |
| 4295 | } |
| 4296 | |
| 4297 | fn plan_field_access( |
| 4298 | ecx: &ExprContext, |
no test coverage detected