Add stream context and window trigger by dai-chen · Pull Request #958 · opensearch-project/sql · GitHub
Skip to content

Add stream context and window trigger#958

Merged
dai-chen merged 2 commits into
opensearch-project:feature/maximus-m1from
dai-chen:maximus-m1/add-window-trigger
Nov 1, 2022
Merged

Add stream context and window trigger#958
dai-chen merged 2 commits into
opensearch-project:feature/maximus-m1from
dai-chen:maximus-m1/add-window-trigger

Conversation

@dai-chen

@dai-chen dai-chen commented Oct 24, 2022

Copy link
Copy Markdown
Collaborator

Description

As another main component for stream data windowing, this PR adds Window Trigger along with Stream Context.

Stream Context

A stream context holds useful context information for all stream processing components. It’s also easy to store and restore between executions by put all state in one place.

Window Trigger

A window trigger determines whether to trigger window state output (a window pane). Common trigger implementation includes:

  • After Watermark: trigger if the window is below watermark.
  • Count: trigger based on a counter. A special case is per-event trigger for materialized view semantics.
  • Time: trigger when its time comes.

Note that window trigger is easy to be confused with watermark. Watermark is the way to reason about the completeness of window state. Window trigger upon user configuration can decide to trigger output no matter the window state is complete or not.

Issues Resolved

#951

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@dai-chen dai-chen added the enhancement New feature or request label Oct 24, 2022
@dai-chen dai-chen self-assigned this Oct 24, 2022
@codecov-commenter

codecov-commenter commented Oct 24, 2022

Copy link
Copy Markdown

Signed-off-by: Chen Dai <daichen@amazon.com>
@dai-chen dai-chen force-pushed the maximus-m1/add-window-trigger branch from 2c5c7ae to f3db6ad Compare October 27, 2022 18:42
Signed-off-by: Chen Dai <daichen@amazon.com>
@dai-chen dai-chen marked this pull request as ready for review October 27, 2022 20:59
@dai-chen dai-chen requested a review from a team as a code owner October 27, 2022 20:59
@dai-chen dai-chen added this to the Maximus M1 - Phase 1 milestone Oct 31, 2022

@penghuo penghuo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks.

@dai-chen dai-chen merged commit 73787b7 into opensearch-project:feature/maximus-m1 Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants