Skip to content
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

Implement half-join operator #320

Merged
merged 2 commits into from
Mar 26, 2021

Conversation

frankmcsherry
Copy link
Member

This PR is the beginning of delta joins for partially ordered times.

Unbeknownst to most, existing delta joins using the lookup_map operator are incorrect for partially ordered times, as two updates at times t1 and t2 that are incomparable with not notice each other, and no update at join(t1, t2) will be produced, which is wrong.

The code here follows the same structure, but orders updates by a TOTAL ORDER, which should ensure that for any two different times one comes before the other (and in this case, that "other" will be responsible for their join output). The use of a total order is a bit weird, and it is possible that I have overlooked some important details. For example, it is important to hold back trace compaction a little, so that we don't accidentally compact times to a point that disrupts the total order; this is pretty easy with (outer, inner) timestamps, as (outer, inner + 1) can be compacted by advancing its outer coordinate, to the point that it appears to come after (outer + 1, inner), which would be problematic. The example show how to evade this (subtract one from each outer coordinate) but generally this is on the user to understand.

This PR also demos the code without using Alt and Neu, who existed to allow the total order "nudge" for partially ordered times. As the comparison is done using total orders here, seems like it might just be ok to skip them and monomorphize on < and <=.

No rush to merge this, and I guess it is optional anyhow so not much harm. The existing lookup_map still makes sense as a look-up operator, just not as the basis of delta joins for partially ordered times.

@frankmcsherry frankmcsherry changed the title Implement half-map operator Implement half-join operator Mar 25, 2021
@frankmcsherry frankmcsherry merged commit 4a85187 into TimelyDataflow:master Mar 26, 2021
This was referenced Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant