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

Support joining updating data #420

Merged
merged 1 commit into from Nov 30, 2023
Merged

Support joining updating data #420

merged 1 commit into from Nov 30, 2023

Conversation

jbeisen
Copy link
Collaborator

@jbeisen jbeisen commented Nov 22, 2023

Operators that produce updating data (insert/update/delete) previously could not be upstream from the JoinWithExpiration operator. This change modifies the JoinWithExpiration operator to correctly handle updating data.

All join types, excluding inner joins on non-updating inputs, now produce updating data.

The bulk of the changes are in join_with_expiration.rs, where we transforms/coerces all data into updating data so that we reuse the same 4 join processors regardless of input type.

Tested by adding new smoke tests and by running the queries through Flink and checking that the outputs are equivalent.

@jbeisen jbeisen force-pushed the joining-updating branch 3 times, most recently from 0620971 to b6c48ee Compare November 28, 2023 20:04
@jbeisen jbeisen mentioned this pull request Nov 28, 2023
Copy link
Contributor

@jacksonrnewhouse jacksonrnewhouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one nit and simplifying the generated code.

@@ -21,299 +25,506 @@ pub struct JoinWithExpiration<
left_expiration: Duration,
right_expiration: Duration,
processor: P,
_t: PhantomData<(K, T1, T2, Output)>,
pub _t: PhantomData<(K, P1, P2, InT1, InT2, T1, T2, Output)>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be a cleaner to just have a new() method that other parts of the code call, instead of making this pub or pub (crate)

Operators that produce updating data (insert/update/delete) previously
could not be upstream from the JoinWithExpiration operator. This change
modifies the JoinWithExpiration operator to correctly handle updating
data.

All join types, excluding inner joins on non-updating inputs, now
produce updating data.

The bulk of the changes are in `join_with_expiration.rs`, where we
transforms/coerces all data into updating data so that we reuse the same
4 join processors regardless of input type.
@jbeisen jbeisen enabled auto-merge (rebase) November 30, 2023 18:07
@jbeisen jbeisen merged commit 8f3cc4c into master Nov 30, 2023
8 checks passed
@jbeisen jbeisen deleted the joining-updating branch December 1, 2023 03:10
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.

None yet

2 participants