-
Notifications
You must be signed in to change notification settings - Fork 707
feat(sink): deduce the append-only attribute for sink executor #7922
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
Conversation
edb0ca5 to
4e92427
Compare
Codecov Report
@@ Coverage Diff @@
## main #7922 +/- ##
=======================================
Coverage 71.61% 71.61%
=======================================
Files 1116 1116
Lines 179579 179604 +25
=======================================
+ Hits 128607 128631 +24
- Misses 50972 50973 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
tabVersion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good work!
just curious, how we deduce whether an mv is append-only
Each streaming operator in the mv plan will derive its append-only attribute according to its input operator's append-only attribute and its own streaming behavior. And an mv's append-only attribute is exactly the materialize operator's append-only attribute. |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
The type of the sink (append-only/upsert) can be deduced in the frontend, and we can simply pass this type to computing. The deduction requires 3 pieces of information:
CREATE SINK s FROM t WITH (...., format = 'append_only')CREATE SINK s FROM t WITH (...., force_append_only = 'true')There are 2 * 2 * 2 = 8 combinations of these 3 attributes. The figure below elaborates on the combinations and their results.
Checklist
./risedev check(or alias,./risedev c)Related issue
Closes #7414
Documentation
Types of user-facing changes
Please keep the types that apply to your changes, and remove the others.
Release note
The user will get an error if the sink has
format = append_onlyin with options while it actually cannot be append-only.The user can fix this by enforcing the sink to be append-only: