Populates `datums` with `self.expressions` and tests `self.predicates`. This does not apply `self.projection`, which is up to the calling method.
(
&'a self,
datums: &'b mut Vec<Datum<'a>>,
arena: &'a RowArena,
)
| 1675 | /// |
| 1676 | /// This does not apply `self.projection`, which is up to the calling method. |
| 1677 | pub fn evaluate_inner<'b, 'a: 'b>( |
| 1678 | &'a self, |
| 1679 | datums: &'b mut Vec<Datum<'a>>, |
| 1680 | arena: &'a RowArena, |
| 1681 | ) -> Result<bool, EvalError> { |
| 1682 | let mut expression = 0; |
| 1683 | for (support, predicate) in self.mfp.predicates.iter() { |
| 1684 | while self.mfp.input_arity + expression < *support { |
| 1685 | datums.push(self.mfp.expressions[expression].eval(&datums[..], arena)?); |
| 1686 | expression += 1; |
| 1687 | } |
| 1688 | if predicate.eval(&datums[..], arena)? != Datum::True { |
| 1689 | return Ok(false); |
| 1690 | } |
| 1691 | } |
| 1692 | while expression < self.mfp.expressions.len() { |
| 1693 | datums.push(self.mfp.expressions[expression].eval(&datums[..], arena)?); |
| 1694 | expression += 1; |
| 1695 | } |
| 1696 | Ok(true) |
| 1697 | } |
| 1698 | |
| 1699 | /// Returns true if evaluation could introduce an error on non-error inputs. |
| 1700 | pub fn could_error(&self) -> bool { |
no test coverage detected