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

Method product

src/sql/src/plan/scope.rs:497–514  ·  view source on GitHub ↗
(self, right: Self)

Source from the content-addressed store, hash-verified

495 }
496
497 pub fn product(self, right: Self) -> Result<Self, PlanError> {
498 let mut l_tables = self.table_names().into_iter().collect::<Vec<_>>();
499 // Make ordering deterministic for testing
500 l_tables.sort_by(|l, r| l.item.cmp(&r.item));
501 let r_tables = right.table_names();
502 for l in l_tables {
503 for r in &r_tables {
504 if l.matches(r) {
505 sql_bail!("table name \"{}\" specified more than once", l.item)
506 }
507 }
508 }
509 Ok(Scope {
510 items: self.items.into_iter().chain(right.items).collect(),
511 ungrouped_columns: vec![],
512 lateral_barrier: false,
513 })
514 }
515
516 pub fn project(&self, columns: &[usize]) -> Self {
517 Scope {

Callers 5

applied_toMethod · 0.45
plan_select_from_whereFunction · 0.45
plan_joinFunction · 0.45
plan_using_constraintFunction · 0.45

Calls 5

table_namesMethod · 0.80
into_iterMethod · 0.45
cmpMethod · 0.45
matchesMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected