|
|
@ -432,13 +432,21 @@ impl<'a> PlanBuilder<'a> { |
|
|
|
Box::new(self.build_for_expression(b, variables, graph_name)?), |
|
|
|
Box::new(self.build_for_expression(b, variables, graph_name)?), |
|
|
|
), |
|
|
|
), |
|
|
|
Expression::In(e, l) => { |
|
|
|
Expression::In(e, l) => { |
|
|
|
|
|
|
|
let e = self.build_for_expression(e, variables, graph_name)?; |
|
|
|
if l.is_empty() { |
|
|
|
if l.is_empty() { |
|
|
|
return Ok(PlanExpression::Literal(PlanTerm { |
|
|
|
// False except on error
|
|
|
|
|
|
|
|
PlanExpression::If( |
|
|
|
|
|
|
|
Box::new(e), |
|
|
|
|
|
|
|
Box::new(PlanExpression::Literal(PlanTerm { |
|
|
|
encoded: false.into(), |
|
|
|
encoded: false.into(), |
|
|
|
plain: false.into(), |
|
|
|
plain: false.into(), |
|
|
|
})); |
|
|
|
})), |
|
|
|
} |
|
|
|
Box::new(PlanExpression::Literal(PlanTerm { |
|
|
|
let e = self.build_for_expression(e, variables, graph_name)?; |
|
|
|
encoded: false.into(), |
|
|
|
|
|
|
|
plain: false.into(), |
|
|
|
|
|
|
|
})), |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} else { |
|
|
|
PlanExpression::Or( |
|
|
|
PlanExpression::Or( |
|
|
|
l.iter() |
|
|
|
l.iter() |
|
|
|
.map(|v| { |
|
|
|
.map(|v| { |
|
|
@ -450,6 +458,7 @@ impl<'a> PlanBuilder<'a> { |
|
|
|
.collect::<Result<_, EvaluationError>>()?, |
|
|
|
.collect::<Result<_, EvaluationError>>()?, |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
Expression::Add(a, b) => PlanExpression::Add( |
|
|
|
Expression::Add(a, b) => PlanExpression::Add( |
|
|
|
Box::new(self.build_for_expression(a, variables, graph_name)?), |
|
|
|
Box::new(self.build_for_expression(a, variables, graph_name)?), |
|
|
|
Box::new(self.build_for_expression(b, variables, graph_name)?), |
|
|
|
Box::new(self.build_for_expression(b, variables, graph_name)?), |
|
|
|