Skip to content

Commit

Permalink
Remove Arrange::arrange_core (#509)
Browse files Browse the repository at this point in the history
The function is a thin wrapper around the freestanding `arrange_core`
function, and doesn't add any additional value. It's not used within
differential.

Signed-off-by: Moritz Hoffmann <[email protected]>
  • Loading branch information
antiguru authored Jun 4, 2024
1 parent be698bc commit 56c62c8
Showing 1 changed file with 2 additions and 32 deletions.
34 changes: 2 additions & 32 deletions src/operators/arrange/arrangement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,6 @@ where
Tr::Batch: Batch,
Tr::Batcher: Batcher<Input=C>,
;

/// Arranges updates into a shared trace, using a supplied parallelization contract, with a supplied name.
fn arrange_core<P, Tr>(&self, pact: P, name: &str) -> Arranged<G, TraceAgent<Tr>>
where
P: ParallelizationContract<G::Timestamp, C>,
Tr: Trace<Time=G::Timestamp>+'static,
Tr::Batch: Batch,
Tr::Batcher: Batcher<Input=C>,
;
}

impl<G, K, V, R> Arrange<G, Vec<((K, V), G::Timestamp, R)>> for Collection<G, (K, V), R>
Expand All @@ -395,17 +386,7 @@ where
Tr::Batcher: Batcher<Input=Vec<((K, V), G::Timestamp, R)>>,
{
let exchange = Exchange::new(move |update: &((K,V),G::Timestamp,R)| (update.0).0.hashed().into());
self.arrange_core(exchange, name)
}

fn arrange_core<P, Tr>(&self, pact: P, name: &str) -> Arranged<G, TraceAgent<Tr>>
where
P: ParallelizationContract<G::Timestamp, Vec<((K,V),G::Timestamp,R)>>,
Tr: Trace<Time=G::Timestamp>+'static,
Tr::Batch: Batch,
Tr::Batcher: Batcher<Input=Vec<((K,V),G::Timestamp,R)>>,
{
arrange_core(&self.inner, pact, name)
arrange_core(&self.inner, exchange, name)
}
}

Expand Down Expand Up @@ -583,18 +564,7 @@ where
Tr::Batcher: Batcher<Input=Vec<((K, ()), G::Timestamp, R)>>,
{
let exchange = Exchange::new(move |update: &((K,()),G::Timestamp,R)| (update.0).0.hashed().into());
self.arrange_core(exchange, name)
}

fn arrange_core<P, Tr>(&self, pact: P, name: &str) -> Arranged<G, TraceAgent<Tr>>
where
P: ParallelizationContract<G::Timestamp, Vec<((K,()),G::Timestamp,R)>>,
Tr: Trace<Time=G::Timestamp>+'static,
Tr::Batch: Batch,
Tr::Batcher: Batcher<Input=Vec<((K,()),G::Timestamp,R)>>,
{
self.map(|k| (k, ()))
.arrange_core(pact, name)
arrange_core(&self.map(|k| (k, ())).inner, exchange, name)
}
}

Expand Down

0 comments on commit 56c62c8

Please sign in to comment.