Skip to content

Commit 5fb0be6

Browse files
authored
Remove flatcontainer, absorb TimelyStack (#570)
Adjust to changes in TimelyDataflow/timely-dataflow#647 which removes flatcontainer and columnation as Timely doesn't have any opinion around the types and defers to downstream crates instead. Ideally, we'd move the TimelyStack to an example, but that would be a bigger change, so I'm holding off for the moment. Signed-off-by: Moritz Hoffmann <[email protected]>
1 parent cc9b1a8 commit 5fb0be6

29 files changed

+628
-807
lines changed

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ graph_map = "0.1"
4242
bytemuck = "1.18.0"
4343

4444
[dependencies]
45-
serde = { version = "1.0", features = ["derive"] }
45+
columnar = "0.3"
46+
columnation = "0.1.0"
4647
fnv="1.0.2"
48+
paste = "1.0"
49+
serde = { version = "1.0", features = ["derive"] }
4750
timely = {workspace = true}
48-
columnar = "0.3"
4951

5052
[workspace.dependencies]
5153
timely = { version = "0.18", default-features = false }

examples/columnar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ mod builder {
348348

349349
use differential_dataflow::trace::implementations::merge_batcher::MergeBatcher;
350350
use differential_dataflow::trace::implementations::merge_batcher::ColMerger;
351-
use timely::container::columnation::TimelyStack;
351+
use differential_dataflow::containers::TimelyStack;
352352

353353
/// A batcher for columnar storage.
354354
pub type Col2ValBatcher<K, V, T, R> = MergeBatcher<Column<((K,V),T,R)>, batcher::Chunker<TimelyStack<((K,V),T,R)>>, ColMerger<(K,V),T,R>>;

examples/spines.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ fn main() {
6464
keys.join_core(&data, |_k, &(), &()| Option::<()>::None)
6565
.probe_with(&mut probe);
6666
},
67-
"flat" => {
68-
use differential_dataflow::trace::implementations::ord_neu::{FlatKeyBatcherDefault, FlatKeyBuilderDefault, FlatKeySpineDefault};
69-
let data = data.arrange::<FlatKeyBatcherDefault<String,usize,isize,_>, FlatKeyBuilderDefault<String,usize,isize>, FlatKeySpineDefault<String,usize,isize>>();
70-
let keys = keys.arrange::<FlatKeyBatcherDefault<String,usize,isize,_>, FlatKeyBuilderDefault<String,usize,isize>, FlatKeySpineDefault<String,usize,isize>>();
71-
keys.join_core(&data, |_k, (), ()| Option::<()>::None)
72-
.probe_with(&mut probe);
73-
}
7467
_ => {
7568
println!("unrecognized mode: {:?}", mode)
7669
}

src/consolidation.rs

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ use std::cmp::Ordering;
1414
use std::collections::VecDeque;
1515
use timely::Container;
1616
use timely::container::{ContainerBuilder, PushInto};
17-
use timely::container::flatcontainer::{FlatStack, Push, Region};
18-
use timely::container::flatcontainer::impls::tuple::{TupleABCRegion, TupleABRegion};
19-
use crate::Data;
17+
use crate::{IntoOwned, Data};
2018
use crate::difference::{IsZero, Semigroup};
21-
use crate::trace::cursor::IntoOwned;
2219

2320
/// Sorts and consolidates `vec`.
2421
///
@@ -321,36 +318,6 @@ where
321318
}
322319
}
323320

324-
impl<K, V, T, R> ConsolidateLayout for FlatStack<TupleABCRegion<TupleABRegion<K, V>, T, R>>
325-
where
326-
for<'a> K: Region + Push<<K as Region>::ReadItem<'a>> + Clone + 'static,
327-
for<'a> K::ReadItem<'a>: Ord + Copy,
328-
for<'a> V: Region + Push<<V as Region>::ReadItem<'a>> + Clone + 'static,
329-
for<'a> V::ReadItem<'a>: Ord + Copy,
330-
for<'a> T: Region + Push<<T as Region>::ReadItem<'a>> + Clone + 'static,
331-
for<'a> T::ReadItem<'a>: Ord + Copy,
332-
R: Region + Push<<R as Region>::Owned> + Clone + 'static,
333-
for<'a> R::Owned: Semigroup<R::ReadItem<'a>>,
334-
{
335-
type Key<'a> = (K::ReadItem<'a>, V::ReadItem<'a>, T::ReadItem<'a>) where Self: 'a;
336-
type Diff<'a> = R::ReadItem<'a> where Self: 'a;
337-
type DiffOwned = R::Owned;
338-
339-
fn into_parts(((key, val), time, diff): Self::Item<'_>) -> (Self::Key<'_>, Self::Diff<'_>) {
340-
((key, val, time), diff)
341-
}
342-
343-
fn cmp<'a>(((key1, val1), time1, _diff1): &Self::Item<'_>, ((key2, val2), time2, _diff2): &Self::Item<'_>) -> Ordering {
344-
(K::reborrow(*key1), V::reborrow(*val1), T::reborrow(*time1)).cmp(&(K::reborrow(*key2), V::reborrow(*val2), T::reborrow(*time2)))
345-
}
346-
347-
fn push_with_diff(&mut self, (key, value, time): Self::Key<'_>, diff: Self::DiffOwned) {
348-
self.copy(((key, value), time, diff));
349-
}
350-
}
351-
352-
353-
354321
#[cfg(test)]
355322
mod tests {
356323
use super::*;

0 commit comments

Comments
 (0)