-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:risingwavelabs/risingwave into bakj…
…os/deno_udf
- Loading branch information
Showing
29 changed files
with
407 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
|
||
statement ok | ||
SET RW_IMPLICIT_FLUSH TO true; | ||
|
||
statement error | ||
create table t0 (v1 int, v2 int, v3 int, v4 int, primary key(v1)) on conflict do update if not null with version column(v5); | ||
|
||
statement error | ||
create table t0 (v1 int, v2 int, v3 int, v4 bool, primary key(v1)) on conflict do update if not null with version column(v4); | ||
|
||
statement error | ||
create table t0 (v1 int, v2 int, v3 int, v4 bool, primary key(v1)) on conflict do update if not null with version column v4; | ||
|
||
statement error | ||
create table t0 (v1 int, v2 int, v3 int, v4 int, primary key(v1)) on conflict ignore with version column(v4); | ||
|
||
statement ok | ||
create table t1 (v1 int, v2 int, v3 int, v4 int, primary key(v1)) on conflict do update if not null with version column(v4); | ||
|
||
statement ok | ||
insert into t1 values (1,null,2, 4), (2,3,null, 1); | ||
|
||
statement ok | ||
insert into t1 values (3,null,5,2), (3,6,null, 1); | ||
|
||
statement ok | ||
insert into t1 values (1,5,null,5), (2,null, 6, 1); | ||
|
||
statement ok | ||
create materialized view mv1 as select * from t1; | ||
|
||
|
||
query III rowsort | ||
select v1, v2, v3, v4 from mv1; | ||
---- | ||
1 5 2 5 | ||
2 3 6 1 | ||
3 NULL 5 2 | ||
|
||
|
||
statement ok | ||
update t1 set v2 = 2 where v1 > 1; | ||
|
||
statement ok | ||
flush; | ||
|
||
query IIII rowsort | ||
select v1, v2, v3, v4 from mv1; | ||
---- | ||
1 5 2 5 | ||
2 2 6 1 | ||
3 2 5 2 | ||
|
||
statement ok | ||
drop materialized view mv1; | ||
|
||
statement ok | ||
drop table t1; | ||
|
||
|
||
statement ok | ||
SET RW_IMPLICIT_FLUSH TO true; | ||
|
||
statement ok | ||
create table t2 (v1 int, v2 int, v3 int, v4 int, primary key(v1)) on conflict overwrite with version column(v4); | ||
|
||
statement ok | ||
insert into t2 values (1,null,2, 4), (2,3,null, 1); | ||
|
||
statement ok | ||
insert into t2 values (3,null,5,2), (3,6,null, 1); | ||
|
||
statement ok | ||
insert into t2 values (1,5,null,3), (2,null, 6, 1); | ||
|
||
statement ok | ||
create materialized view mv2 as select * from t2; | ||
|
||
|
||
query III rowsort | ||
select v1, v2, v3, v4 from mv2; | ||
---- | ||
1 NULL 2 4 | ||
2 NULL 6 1 | ||
3 NULL 5 2 | ||
|
||
statement ok | ||
drop materialized view mv2; | ||
|
||
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
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
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.