Skip to content

Commit d352100

Browse files
authored
Added example commands to examples/multitemporal.rs (#607)
1 parent d36c6e3 commit d352100

File tree

1 file changed

+75
-1
lines changed

1 file changed

+75
-1
lines changed

differential-dataflow/examples/multitemporal.rs

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,4 +310,78 @@ fn read_integers<'a>(input: impl Iterator<Item=&'a str>) -> Result<Vec<isize>, s
310310
integers.push(text.parse()?);
311311
}
312312
Ok(integers)
313-
}
313+
}
314+
315+
316+
/*
317+
318+
-- Example commands to run and reason about their outputs. For consumption alongside https://www.youtube.com/watch?v=0WijjN0LiZ4
319+
320+
-- add five symbols
321+
update 000 0 0 +1
322+
update 111 0 0 +1
323+
update 222 0 0 +1
324+
update 333 0 0 +1
325+
update 444 0 0 +1
326+
query 0 0
327+
328+
advance-input 1 0
329+
query 0 0
330+
331+
-- update some symbols
332+
update 000 1 1 -1
333+
update 111 1 1 +2
334+
update 222 1 1 +1
335+
advance-input 2 0
336+
query 1 1
337+
338+
-- explore what we used to know
339+
query 0 0
340+
query 0 5
341+
query 1 0
342+
query 1 1
343+
344+
-- two weirder changes
345+
update 111 2 0 -1
346+
update 333 2 4 +1
347+
advance-input 3 0
348+
query 2 0
349+
query 2 1
350+
query 2 2
351+
query 2 3
352+
query 2 4
353+
354+
-- ask some questions
355+
query 0 4
356+
query 1 4
357+
query 2 4
358+
359+
-- let go of the past
360+
advance-output 1 0
361+
query 0 4
362+
query 1 4
363+
query 2 4
364+
365+
-- lock down data history
366+
advance-input 3 2
367+
update 111 3 0 +1
368+
update 111 4 0 +1
369+
update 333 3 4 -1
370+
advance-input 4 2
371+
372+
-- report "certain" answers for data
373+
query 10000 0
374+
query 10000 1
375+
query 10000 2
376+
377+
-- data time advancing allows us to know
378+
advance-input 4 3
379+
query 10000 2
380+
381+
-- alternately, speculate about the ending
382+
query 3 10000
383+
384+
-- clean up after ourselves
385+
advance-output 4 3
386+
387+
*/

0 commit comments

Comments
 (0)