forked from risingwavelabs/risingwave
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(streaming): support delta join on primary table (risingwavelabs#…
…7662) - Support delta join on primary table, because primary table is also an index as well. Approved-By: st1page
- Loading branch information
Showing
10 changed files
with
308 additions
and
78 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
47 changes: 47 additions & 0 deletions
47
e2e_test/streaming/delta_join/delta_join_snapshot_no_index.slt
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,47 @@ | ||
statement ok | ||
set rw_implicit_flush = true; | ||
|
||
statement ok | ||
set rw_streaming_enable_delta_join = true; | ||
|
||
statement ok | ||
set streaming_parallelism = 2; | ||
|
||
statement ok | ||
create table a (a1 int primary key, a2 int); | ||
|
||
statement ok | ||
set streaming_parallelism = 3; | ||
|
||
statement ok | ||
create table b (b1 int primary key, b2 int); | ||
|
||
statement ok | ||
insert into A values (1,2), (11, 22); | ||
|
||
statement ok | ||
insert into B values (1,4), (11, 44); | ||
|
||
statement ok | ||
set streaming_parallelism = 0; | ||
|
||
statement ok | ||
create materialized view v as select * from a join b on a.a1 = b.b1; | ||
|
||
query IIII rowsort | ||
select * from v order by a1, a2, b1, b2; | ||
---- | ||
1 2 1 4 | ||
11 22 11 44 | ||
|
||
statement ok | ||
drop materialized view v; | ||
|
||
statement ok | ||
drop table a; | ||
|
||
statement ok | ||
drop table b; | ||
|
||
statement ok | ||
set rw_streaming_enable_delta_join = false; |
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
47 changes: 47 additions & 0 deletions
47
e2e_test/streaming/delta_join/delta_join_upstream_no_index.slt
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,47 @@ | ||
statement ok | ||
set rw_implicit_flush = true; | ||
|
||
statement ok | ||
set rw_streaming_enable_delta_join = true; | ||
|
||
statement ok | ||
set streaming_parallelism = 2; | ||
|
||
statement ok | ||
create table a (a1 int primary key, a2 int); | ||
|
||
statement ok | ||
set streaming_parallelism = 3; | ||
|
||
statement ok | ||
create table b (b1 int primary key, b2 int); | ||
|
||
statement ok | ||
set streaming_parallelism = 0; | ||
|
||
statement ok | ||
create materialized view v as select * from a join b on a.a1 = b.b1; | ||
|
||
statement ok | ||
insert into A values (1,2), (11, 22); | ||
|
||
statement ok | ||
insert into B values (1,4), (11, 44); | ||
|
||
query IIII rowsort | ||
select * from v order by a1, a2, b1, b2; | ||
---- | ||
1 2 1 4 | ||
11 22 11 44 | ||
|
||
statement ok | ||
drop materialized view v; | ||
|
||
statement ok | ||
drop table a; | ||
|
||
statement ok | ||
drop table b; | ||
|
||
statement ok | ||
set rw_streaming_enable_delta_join = false; |
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
Oops, something went wrong.