-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(stream): arrangement backfill should use dist key instead of pk t…
…o derive vnode (#16815)
- Loading branch information
Showing
5 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
statement ok | ||
create table t(v1 int, v2 int primary key, v3 int); | ||
|
||
statement ok | ||
create table t2(v1 int, v2 int primary key, v3 int); | ||
|
||
# Let snapshot side pk >= upstream side | ||
statement ok | ||
insert into t select 50000 + generate_series, 60000 + generate_series, 70000 + generate_series from generate_series(1, 10000); | ||
|
||
statement ok | ||
insert into t2 select 50000 + generate_series, 60000 + generate_series, 70000 + generate_series from generate_series(1, 10000); | ||
|
||
statement ok | ||
flush; | ||
|
||
statement ok | ||
create materialized view m1 as select t.v1, t.v2, t.v3 from t join t2 using(v1); | ||
|
||
statement ok | ||
set streaming_rate_limit = 1; | ||
|
||
statement ok | ||
set background_ddl = true; | ||
|
||
statement ok | ||
create sink s1 as select t.v1, t.v2, t.v3 from m1 join t using(v3) with (connector = 'blackhole'); | ||
|
||
# Let snapshot side pk >= upstream side | ||
statement ok | ||
insert into t select 10000 + generate_series, 20000 + generate_series, 30000 + generate_series from generate_series(1, 10000); | ||
|
||
statement ok | ||
insert into t2 select 10000 + generate_series, 20000 + generate_series, 30000 + generate_series from generate_series(1, 10000); | ||
|
||
statement ok | ||
flush; | ||
|
||
statement ok | ||
drop sink s1; | ||
|
||
statement ok | ||
drop materialized view m1; | ||
|
||
statement ok | ||
drop table t; | ||
|
||
statement ok | ||
drop table t2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters