Skip to content

Commit

Permalink
refactor: address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
iajoiner committed Dec 18, 2024
1 parent a90e584 commit a2a3fce
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/proof-of-sql/src/base/database/join_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::base::{
use alloc::vec::Vec;
use bumpalo::Bump;
use core::cmp::Ordering;
use itertools::Itertools;
use itertools::{iproduct, Itertools};
use sqlparser::ast::Ident;

/// Compute the CROSS JOIN / cartesian product of two tables.
Expand Down Expand Up @@ -103,10 +103,7 @@ fn get_sort_merge_join_indexes<'a, S: Scalar>(
.collect();

// Generate all pairs (Cartesian product)
let pairs: Vec<_> = left_group
.iter()
.flat_map(|&l| right_group.iter().map(move |&r| (l, r)))
.collect();
let pairs: Vec<_> = iproduct!(left_group, right_group).collect();

// Advance the iterators
left_iter.nth(left_group.len() - 1);
Expand Down

0 comments on commit a2a3fce

Please sign in to comment.