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

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

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.22%. Comparing base (91baab1) to head (5be25c6).
⚠️ Report is 84 commits behind head on feature/maximus-m1.

❌ Your project status has failed because the head coverage (95.22%) is below the target coverage (99.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@                   Coverage Diff                    @@
##             feature/maximus-m1     #958      +/-   ##
========================================================
- Coverage                 97.96%   95.22%   -2.74%     
- Complexity                 3154     3157       +3     
========================================================
  Files                       303      315      +12     
  Lines                      7805     8469     +664     
  Branches                    504      623     +119     
========================================================
+ Hits                       7646     8065     +419     
- Misses                      158      350     +192     
- Partials                      1       54      +53     
Flag Coverage Δ
query-workbench 62.76% <ø> (?)
sql-engine 97.96% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dai-chen
dai-chen force-pushed the maximus-m1/add-window-trigger branch from 2c5c7ae to f3db6ad Compare October 27, 2022 18:42
@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