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

Method join

src/expr/src/relation.rs:1292–1305  ·  view source on GitHub ↗

Performs a relational equijoin among the input collections. The sequence `inputs` each describe different input collections, and the sequence `variables` describes equality constraints that some of their columns must satisfy. Each element in `variable` describes a set of pairs `(input_index, column_index)` where every value described by that set must be equal. For example, the pair `(input, col

(inputs: Vec<MirRelationExpr>, variables: Vec<Vec<(usize, usize)>>)

Source from the content-addressed store, hash-verified

1290 /// let result = joined.project(vec![0, 1, 3]);
1291 /// ```
1292 pub fn join(inputs: Vec<MirRelationExpr>, variables: Vec<Vec<(usize, usize)>>) -> Self {
1293 let input_mapper = join_input_mapper::JoinInputMapper::new(&inputs);
1294
1295 let equivalences = variables
1296 .into_iter()
1297 .map(|vs| {
1298 vs.into_iter()
1299 .map(|(r, c)| input_mapper.map_expr_to_global(MirScalarExpr::column(c), r))
1300 .collect::<Vec<_>>()
1301 })
1302 .collect::<Vec<_>>();
1303
1304 Self::join_scalars(inputs, equivalences)
1305 }
1306
1307 /// Constructs a join operator from inputs and required-equal scalar expressions.
1308 pub fn join_scalars(

Callers 15

serve_with_triggerMethod · 0.45
make_caMethod · 0.45
ca_cert_pathMethod · 0.45
request_certMethod · 0.45
histogramSeriesToTsvFunction · 0.45
tsvTextFunction · 0.45
MetricFamilyFunction · 0.45
RawDataFunction · 0.45
ViewFunction · 0.45
makeAddrStrFunction · 0.45
getPortNodesFunction · 0.45
buildClusterFunction · 0.45

Calls 3

map_expr_to_globalMethod · 0.80
mapMethod · 0.45
into_iterMethod · 0.45

Tested by 15

serve_with_triggerMethod · 0.36
make_caMethod · 0.36
ca_cert_pathMethod · 0.36
request_certMethod · 0.36
test_concurrent_writesFunction · 0.36
test_pg_cancel_backendFunction · 0.36