-
Notifications
You must be signed in to change notification settings - Fork 599
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
feat(on conflict): add with version column clause and behavior #16091
Conversation
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.
please also return error in frontend when it is not actually implemented in the executor
…nto wcy/with_version_column
…nto wcy/with_version_column
src/meta/model_v2/migration/src/add_column_for_with_version_column.rs
Outdated
Show resolved
Hide resolved
I'm sorry but I didn't get the intention of this 400+ LoC PR from the title. Can you elaborate more? Should there be an issue for this? By the way, is this PR considered a user-facing change? If so, please specify the release note and label the PR. cc @st1page Kindly suggest taking the above into consideration when reviewing a PR. |
This is a user request feature(detail in #15515 and doc in https://github.com/risingwavelabs/risingwave-docs/pull/1860), which uses partial update for the scene of widening the table as the performance of multiway join is relatively poor. CREATE TABLE d1(v1 int, k int primary key);
CREATE TABLE d2(v2 int, k int primary key);
CREATE TABLE d3(v3 int, k int primary key);
CREATE TABLE wide_d(v1 int, v2 int, v3 int, k primary key)
ON CONFLICT DO UPDATE IF NOT NULL;
CREATE SINK sink1 INTO wide_d (v1, k) AS
SELECT v1, k FROM d1
with (
type = 'append-only',
force_append_only = 'true',
);
CREATE SINK sink2 INTO wide_d (v2, k) AS
SELECT v2, k FROM d2
with (
type = 'append-only',
force_append_only = 'true',
);
CREATE SINK sink3 INTO wide_d (v3,k) AS
SELECT v3, k FROM d3
with (
type = 'append-only',
force_append_only = 'true',
); |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
related to #15515.
This pr introduce
WITH VERSION COLUMN(column_name)
clause, as a supplementary constraint on conflict behavior.WITH VERSION COLUMN
only applies to the two conflict behaviors ofoverwrite
anddo update if not null
. When the version column is specified, the corresponding handle will continue to be executed only when the version column of the new row is greater than or equal to the version column of the old row. conflict behavior.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.