Skip to content

[SPARK-55630][SS] Skip updating matched flag for non-outer side in stream-stream join v4#54854

Open
HeartSaVioR wants to merge 1 commit intoapache:masterfrom
HeartSaVioR:SPARK-55630
Open

[SPARK-55630][SS] Skip updating matched flag for non-outer side in stream-stream join v4#54854
HeartSaVioR wants to merge 1 commit intoapache:masterfrom
HeartSaVioR:SPARK-55630

Conversation

@HeartSaVioR
Copy link
Contributor

What changes were proposed in this pull request?

This PR proposes to skip updating matched flag for non-outer side in stream-stream join v4.

Why are the changes needed?

After the insertion of the row into the state, we had to also "update" the row in the state back when it matches with the other side, to update the matched flag. This is not necessary for the join side which does not produce outer null; we want to avoid the unnecessary update.

Note that the optimization is applicable to v2 and v3 as well. But this optimization would break the case where the user changes the join type during the restart (which is undocumented and arguably never guaranteed), so it'd be safer to only introduce the optimization in v4 only and apply back to v2/3 if you see demand.

Does this PR introduce any user-facing change?

No, the optimization is internal. We are introducing a behavioral change (despite undocumented and never guaranteed) but we only apply this optimization to v4, which is yet to be released.

How was this patch tested?

New UTs.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude 4.6 opus

}
}

// V1 excluded: V1 converter does not persist matched flags (SPARK-26154)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can remove this test once we rebase after merging #54769

}
}

// V1 excluded: V1 converter does not persist matched flags (SPARK-26154)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can remove this test once we rebase after merging #54769

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.

1 participant