-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bugen Zhao <[email protected]>
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 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,50 @@ | ||
# https://github.com/risingwavelabs/risingwave/issues/11915 | ||
# https://github.com/risingwavelabs/risingwave/pull/17156 | ||
# https://github.com/risingwavelabs/risingwave/issues/19532 | ||
|
||
statement ok | ||
set streaming_parallelism to 1; | ||
|
||
statement ok | ||
create table t(x int); | ||
|
||
statement ok | ||
create materialized view mv as select x, generate_series(1, 2, x) from t; | ||
|
||
statement ok | ||
set streaming_parallelism to default; | ||
|
||
# x = 0 causes generate_series(1, 2, x) to return an error. | ||
statement ok | ||
insert into t values (0), (1); | ||
|
||
statement ok | ||
flush; | ||
|
||
# Output 0 row when the set-returning function returns error, | ||
# while x = 1 is fine. | ||
query II rowsort | ||
select * from mv; | ||
---- | ||
1 1 | ||
1 2 | ||
|
||
# Delete the error row. | ||
statement ok | ||
delete from t where x = 0; | ||
|
||
statement ok | ||
flush; | ||
|
||
# The result should be the same as before. | ||
query II rowsort | ||
select * from mv; | ||
---- | ||
1 1 | ||
1 2 | ||
|
||
statement ok | ||
drop materialized view mv; | ||
|
||
statement ok | ||
drop table t; |