diff --git a/e2e_test/sink/sink_into_table.slt b/e2e_test/sink/sink_into_table.slt index 25454546370d9..8878f5c622f86 100644 --- a/e2e_test/sink/sink_into_table.slt +++ b/e2e_test/sink/sink_into_table.slt @@ -12,10 +12,7 @@ create table m_simple (v1 int primary key, v2 int); statement ok create sink s_simple_1 into m_simple as select v1, v2 from t_simple; -statement error Create sink into table with incoming sinks has not been implemented. -create sink s_simple_2 into m_simple as select v1, v2 from t_simple; - -# and we can't alter a table with incoming sinks +# we can't alter a table with incoming sinks statement error Alter a table with incoming sinks has not been implemented. alter table m_simple add column v3 int; @@ -363,3 +360,93 @@ drop table t_b; statement ok drop table t_c; + +# multi sinks + +statement ok +create table t_a(v int primary key); + +statement ok +insert into t_a values (1), (2), (3); + +statement ok +create table t_b(v int primary key); + +statement ok +insert into t_b values (3), (4), (5); + +statement ok +create table t_c(v int primary key); + +statement ok +insert into t_c values (5), (6), (7); + +statement ok +create table t_m(v int primary key); + +statement ok +create sink s_a into t_m as select v from t_a; + +statement ok +create sink s_b into t_m as select v from t_b; + +statement ok +create sink s_c into t_m as select v from t_c; + +query I rowsort +select * from t_m order by v; +---- +1 +2 +3 +4 +5 +6 +7 + +statement ok +drop sink s_a; + +statement ok +insert into t_b values (11), (12), (13); + +query I +select * from t_m order by v; +---- +1 +2 +3 +4 +5 +6 +7 +11 +12 +13 + +statement ok +drop sink s_b; + +statement ok +drop sink s_c; + +statement ok +delete from t_m where v > 5; + +query I +select * from t_m order by v; +---- +1 +2 +3 +4 +5 + +statement ok +drop table t_a; + +statement ok +drop table t_b; + +statement ok +drop table t_c;