(self, right: Self)
| 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 { |
no test coverage detected