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

[SPARK-47784][SS] Merge TTLMode and TimeoutMode into a single TimeMode. #45960

Closed
wants to merge 4 commits into from

Conversation

sahnib
Copy link
Contributor

@sahnib sahnib commented Apr 9, 2024

What changes were proposed in this pull request?

This PR merges the TimeoutMode and TTLMode parameter for transformWithState into a single TimeMode. Currently, users need to specify the notion of time (ProcessingTime/EventTime) for timers and ttl separately. This allows users to use a single parameter.

We do not expect users to use mix/match EventTime/ProcessingTime for timers and ttl in a single query because it makes hard to reason about the time semantics (when will timer be fired?, when will the state be evicted? etc.). Its simpler to stick to one notion of time throughout timers and ttl.

Why are the changes needed?

Changes are needed to simplify Arbitrary State API transformWithState interface by merging TTLMode/TimeoutMode into a single TimeMode.

Does this PR introduce any user-facing change?

Yes, this PR changes the API parameters for transformWithState.

How was this patch tested?

All existing testcases for transformWithState API pass.

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

No

@github-actions github-actions bot added the BUILD label Apr 9, 2024
@sahnib sahnib changed the title [SS] Merge TTLMode and TimeoutMode into a single TimeMode. [SPARK-47784][SS] Merge TTLMode and TimeoutMode into a single TimeMode. Apr 9, 2024
@sahnib
Copy link
Contributor Author

sahnib commented Apr 9, 2024

@HeartSaVioR @anishshri-db PTAL.

Copy link
Contributor

@anishshri-db anishshri-db left a comment

Choose a reason for hiding this comment

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

LGTM - pending minor nits

@sahnib
Copy link
Contributor Author

sahnib commented Apr 10, 2024

@HeartSaVioR PTAL.

Copy link
Contributor

@HeartSaVioR HeartSaVioR left a comment

Choose a reason for hiding this comment

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

Only nits. Looks great in overall.

@sahnib sahnib requested a review from HeartSaVioR April 12, 2024 02:28
Copy link
Contributor

@HeartSaVioR HeartSaVioR left a comment

Choose a reason for hiding this comment

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

+1 pending CI

@HeartSaVioR
Copy link
Contributor

The CI failure happened in known flakiness - SparkSessionE2ESuite.

@HeartSaVioR
Copy link
Contributor

Thanks! Merging to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants