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

Rust SDK: Deduplicate rows accross queries #2286

Merged
merged 17 commits into from
Feb 21, 2025
Merged

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Feb 20, 2025

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.

@Centril Centril requested a review from gefjon as a code owner February 20, 2025 14:46
@Centril Centril force-pushed the centril/rust-sdk-row-dedup branch from c359d67 to f26aa7b Compare February 20, 2025 14:47
Copy link
Contributor

@gefjon gefjon left a 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!

@Centril Centril force-pushed the centril/rust-sdk-row-dedup branch 2 times, most recently from 0722c31 to e8c19e6 Compare February 21, 2025 18:39
@Centril Centril force-pushed the centril/rust-sdk-row-dedup branch from b9d7ea3 to ce4999a Compare February 21, 2025 19:34
@Centril Centril force-pushed the centril/rust-sdk-row-dedup branch from ce4999a to 3d8f57f Compare February 21, 2025 20:48
@Centril Centril enabled auto-merge February 21, 2025 20:56
@Centril Centril added this pull request to the merge queue Feb 21, 2025
Merged via the queue into master with commit b34caf8 Feb 21, 2025
13 of 14 checks passed
@Centril Centril deleted the centril/rust-sdk-row-dedup branch February 21, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants