-
Notifications
You must be signed in to change notification settings - Fork 109
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
Rust SDK: Deduplicate rows accross queries #2286
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c359d67
to
f26aa7b
Compare
gefjon
approved these changes
Feb 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment-ey suggestions. Needs corresponding private PR to re-run codegen. Looks good, and I appreciate the test!
0722c31
to
e8c19e6
Compare
joshua-spacetime
approved these changes
Feb 21, 2025
b9d7ea3
to
ce4999a
Compare
Co-authored-by: Phoebe Goldman <[email protected]> Signed-off-by: Mazdak Farrokhzad <[email protected]>
Co-authored-by: Phoebe Goldman <[email protected]> Signed-off-by: Mazdak Farrokhzad <[email protected]>
ce4999a
to
3d8f57f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of Changes
Implements row deduplication on the Rust SDK side via reference counting.
A new type/trait
AppliedDiff
is added which records delete/insert/update events.This type is then used to call callbacks.
Calculating updates is now done after insert/delete events have been calculated, and is done purely on
(Table)AppliedDiff
.As before, this work is requested by specific tables in the codegen, but this is done last in applying the diff rather than than during parsing.
API and ABI breaking changes
None.
Expected complexity level and risk
3, fairly complicated code and in a central location.
Testing
A test
(exec_)row_deduplication
is added that ensures that duplicate callbacks aren't received.The test also ensures that the right insert/delete/update events happen as we expect.