(
ecx: &ExprContext,
lhs: &Expr<Aug>,
list: &Vec<Expr<Aug>>,
negated: &bool,
)
| 4251 | } |
| 4252 | |
| 4253 | fn plan_in_list( |
| 4254 | ecx: &ExprContext, |
| 4255 | lhs: &Expr<Aug>, |
| 4256 | list: &Vec<Expr<Aug>>, |
| 4257 | negated: &bool, |
| 4258 | ) -> Result<CoercibleScalarExpr, PlanError> { |
| 4259 | let ecx = ecx.with_name("IN list"); |
| 4260 | let or = HirScalarExpr::variadic_or( |
| 4261 | list.into_iter() |
| 4262 | .map(|e| { |
| 4263 | let eq = lhs.clone().equals(e.clone()); |
| 4264 | plan_expr(&ecx, &eq)?.type_as(&ecx, &SqlScalarType::Bool) |
| 4265 | }) |
| 4266 | .collect::<Result<Vec<HirScalarExpr>, PlanError>>()?, |
| 4267 | ); |
| 4268 | Ok(if *negated { |
| 4269 | or.call_unary(UnaryFunc::Not(expr_func::Not)) |
| 4270 | } else { |
| 4271 | or |
| 4272 | } |
| 4273 | .into()) |
| 4274 | } |
| 4275 | |
| 4276 | fn plan_homogenizing_function( |
| 4277 | ecx: &ExprContext, |
no test coverage detected