Skip to content

Commit

Permalink
Remove (key, val) structure from merge batchers (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmcsherry authored Dec 6, 2024
1 parent b846f73 commit a3bf1db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/trace/implementations/merge_batcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,14 @@ impl<T> VecMerger<T> {
}
}

impl<K, V, T, R> Merger for VecMerger<((K, V), T, R)>
impl<D, T, R> Merger for VecMerger<(D, T, R)>
where
K: Data,
V: Data,
D: Data,
T: Ord + PartialOrder + Clone + 'static,
R: Semigroup + 'static,
{
type Time = T;
type Chunk = Vec<((K, V), T, R)>;
type Chunk = Vec<(D, T, R)>;

fn merge(&mut self, list1: Vec<Self::Chunk>, list2: Vec<Self::Chunk>, output: &mut Vec<Self::Chunk>, stash: &mut Vec<Self::Chunk>) {
let mut list1 = list1.into_iter();
Expand Down
7 changes: 3 additions & 4 deletions src/trace/implementations/merge_batcher_col.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,14 @@ impl<T: Columnation> ColumnationMerger<T> {
}
}

impl<K, V, T, R> Merger for ColumnationMerger<((K, V), T, R)>
impl<D, T, R> Merger for ColumnationMerger<(D, T, R)>
where
K: Columnation + Ord + Data,
V: Columnation + Ord + Data,
D: Columnation + Ord + Data,
T: Columnation + Ord + PartialOrder + Data,
R: Columnation + Semigroup + 'static,
{
type Time = T;
type Chunk = TimelyStack<((K, V), T, R)>;
type Chunk = TimelyStack<(D, T, R)>;

fn merge(&mut self, list1: Vec<Self::Chunk>, list2: Vec<Self::Chunk>, output: &mut Vec<Self::Chunk>, stash: &mut Vec<Self::Chunk>) {
let mut list1 = list1.into_iter();
Expand Down

0 comments on commit a3bf1db

Please sign in to comment.