Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 timest1
andt2
that are incomparable with not notice each other, and no update atjoin(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 itsouter
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
andNeu
, 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.