Skip to content

Commit

Permalink
Implement e2e test for error messages, sink creation, table alteratio…
Browse files Browse the repository at this point in the history
…n, query sorting, sink and table dropping.
  • Loading branch information
shanicky committed Nov 27, 2023
1 parent c6cbf93 commit 0de805a
Showing 1 changed file with 91 additions and 4 deletions.
95 changes: 91 additions & 4 deletions e2e_test/sink/sink_into_table.slt
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

0 comments on commit 0de805a

Please sign in to comment.