-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing an unseen tuple actually inserts it #346
Comments
I'm not sure what your output corresponds to, I'm sorry. My best guess is that you are writing a datalog-alike, and using |
Thanks for the fast reply @frankmcsherry .
I make use of |
If you insert an inspect operator in the dataflow you will be able to see the updates that flow past, which may clarify things. Your retraction make the record accumulate to a -1 multiplicity, and distinct maps all non-zero multiplicities to a multiplicity of one.
…Sent from my iPhone
On Nov 18, 2021, at 09:49, stefAIno ***@***.***> wrote:
Thanks for the fast reply @frankmcsherry .
To implement the rule I've stated I have used:
let mut r_in = InputSession::new();
let probe = worker.dataflow(|transitive_closure| {
let r = r_in.to_collection(transitive_closure);
r
.iterate(|inner| {
let join = inner
.map(|(x,y)| (y,x))
.join(&inner)
.map(|(_, (x,z))| (x,z));
inner
.concat(&join)
.consolidate()
.distinct()
})
.inspect(|x| println!("r{:?}", x))
.probe()
});
I make use of distinct() to avoid duplicate tuples. It is still not clear to me why is this affecting the removal behaviour, could you please elaborate more?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Ok, I understand the effect of distinct() now. However, in the following program (reads in inputs like +1,a,b or -1,b,c) I do not use the distinct operator, and still see that removing two tuples which do represent a join match, actually do yield an update with multiplicity "1" ...which looks a bit odd, but is due to the multiset logic/semantic?
|
Hi everyone, I have a question about the behaviour of differential dataflow.
I have set up a query implementation and tried to play a little with the framework. I have noticed that trying to remove an unseen tuple will actually result in an insertion of the same. Trying to remove again the same tuple gives no result, same as trying to inserting it. If I try to make use of that tuple to fire rules attivation, it is actually present. Why is there such a behaviour?
Here an example:
The text was updated successfully, but these errors were encountered: