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

Method map

src/expr/src/relation.rs:1177–1189  ·  view source on GitHub ↗

Append to each row the results of applying elements of `scalar`.

(mut self, scalars: Vec<MirScalarExpr>)

Source from the content-addressed store, hash-verified

1175
1176 /// Append to each row the results of applying elements of `scalar`.
1177 pub fn map(mut self, scalars: Vec<MirScalarExpr>) -> Self {
1178 if let MirRelationExpr::Map { scalars: s, .. } = &mut self {
1179 s.extend(scalars);
1180 self
1181 } else if !scalars.is_empty() {
1182 MirRelationExpr::Map {
1183 input: Box::new(self),
1184 scalars,
1185 }
1186 } else {
1187 self
1188 }
1189 }
1190
1191 /// Append to each row a single `scalar`.
1192 pub fn map_one(self, scalar: MirScalarExpr) -> Self {

Callers 15

typ_with_input_typesMethod · 0.45
keys_with_input_keysMethod · 0.45
constantMethod · 0.45
constant_diffMethod · 0.45
map_oneMethod · 0.45
joinMethod · 0.45
reduceMethod · 0.45
anti_lookupMethod · 0.45
debug_size_and_depthMethod · 0.45
make_nonrecursiveMethod · 0.45
on_uniqueMethod · 0.45

Calls 2

extendMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected