Skip to content

Commit

Permalink
add e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Nov 12, 2024
1 parent d40cfca commit 65db3e1
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions e2e_test/streaming/bug_fixes/issue_19532.slt
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;

0 comments on commit 65db3e1

Please sign in to comment.