Generalize arrange to change type of records #300
Draft
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 introduces a generalization to the
arrange
method, which now allows the user to interpose between the batch formation and accepting the batch into the output trace. In particular, the input and output trace formats may be different, which allows the user the ability to perform some non-standard translation, for example playing a state machine forward and recording the transitions in the output.The vanilla
arrange_core
operator is now implemented using "logic" that just passes through the input batch. It looks like so:Other operators like
upsert
andreduce
could in principle be ported to this framework, but I wanted to float this first before doing a massive re-write.cc: @ruchirK @petrosagg