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

Method lookup

src/expr/src/relation.rs:1664–1677  ·  view source on GitHub ↗

Return: every row in keys_and_values every row in `self` that does not have a matching row in the first columns of `keys_and_values`, using `default` to fill in the remaining columns (This is LEFT OUTER JOIN if: 1) `default` is a row of null 2) matching rows in `keys_and_values` and `self` have the same multiplicity.)

(
        self,
        id_gen: &mut IdGen,
        keys_and_values: MirRelationExpr,
        default: Vec<(Datum<'static>, ReprScalarType)>,
    )

Source from the content-addressed store, hash-verified

1662 /// 1) `default` is a row of null
1663 /// 2) matching rows in `keys_and_values` and `self` have the same multiplicity.)
1664 pub fn lookup<E>(
1665 self,
1666 id_gen: &mut IdGen,
1667 keys_and_values: MirRelationExpr,
1668 default: Vec<(Datum<'static>, ReprScalarType)>,
1669 ) -> Result<MirRelationExpr, E> {
1670 keys_and_values.let_in(id_gen, |id_gen, get_keys_and_values| {
1671 Ok(get_keys_and_values.clone().union(self.anti_lookup(
1672 id_gen,
1673 get_keys_and_values,
1674 default,
1675 )?))
1676 })
1677 }
1678
1679 /// True iff the expression contains a `NullaryFunc::MzLogicalTimestamp`.
1680 pub fn contains_temporal(&self) -> bool {

Callers

nothing calls this directly

Calls 4

let_inMethod · 0.80
anti_lookupMethod · 0.80
unionMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected