Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dogsdogsdogs/examples/delta_query2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn main() {
changes1,
forward2,
closure,
|t1,t2| t1.lt(t2), // This one ignores concurrent updates.
true, // This one ignores concurrent updates.
|key, val1, val2| (key.clone(), (val1.clone(), val2.clone())),
);

Expand All @@ -52,7 +52,7 @@ fn main() {
changes2,
forward1,
closure,
|t1,t2| t1.le(t2), // This one can "see" concurrent updates.
false, // This one can "see" concurrent updates.
|key, val1, val2| (key.clone(), (val2.clone(), val1.clone())),
);

Expand Down
16 changes: 5 additions & 11 deletions dogsdogsdogs/src/operators/count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,10 @@ where
builder.push_into(((triple, payload.clone()), initial.clone(), diff1.clone()));
};

use crate::operators::half_join::half_join_internal_unsafe as half_join_unsafe;
// Branch once here, so that each comparison monomorphizes rather than testing `strict` at
// every timestamp. The cost is instantiating `half_join` twice.
if strict {
half_join_unsafe::<_, _, _, _, _, _, _, _, Output<P, Tr::Time, R>>(
requests, arrangement, frontier_func, |t1, t2| t1 < t2, |_timer, _count| false, output_func)
}
else {
half_join_unsafe::<_, _, _, _, _, _, _, _, Output<P, Tr::Time, R>>(
requests, arrangement, frontier_func, |t1, t2| t1 <= t2, |_timer, _count| false, output_func)
}
use crate::operators::half_join::cursors::half_join_internal_unsafe as half_join_unsafe;
// `strict` now reaches the join as a value rather than as a comparison closure, so there is
// nothing left to monomorphize by branching here; the test is made per arrangement time.
half_join_unsafe::<_, _, _, _, _, _, _, Output<P, Tr::Time, R>>(
requests, arrangement, frontier_func, strict, |_timer, _count| false, output_func)
.as_collection()
}
Loading
Loading