MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / evaluate_inner

Method evaluate_inner

src/expr/src/linear.rs:1677–1697  ·  view source on GitHub ↗

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,
        )

Source from the content-addressed store, hash-verified

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 {

Callers 9

evaluate_intoMethod · 0.80
evaluate_iterMethod · 0.80
evaluateMethod · 0.80
build_distinctMethod · 0.80
build_basic_aggregateMethod · 0.80
build_bucketedMethod · 0.80
build_monotonicMethod · 0.80
build_accumulableMethod · 0.80

Calls 4

iterMethod · 0.45
pushMethod · 0.45
evalMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected