Skip to content

Commit

Permalink
Add test to catch circular dep when creating sinks from materialized …
Browse files Browse the repository at this point in the history
…views
  • Loading branch information
shanicky committed Feb 21, 2024
1 parent adb3d2a commit 696a904
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions e2e_test/sink/sink_into_table/basic.slt
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,35 @@ drop table t_b;
statement ok
drop table t_c;

# cycle check (with materialize view)

statement ok
create table t_a(v int primary key);

statement ok
create materialized view m_a as select v from t_a;

statement ok
create table t_b(v int primary key);

statement ok
create sink s_a into t_b as select v from m_a;

statement error Creating such a sink will result in circular dependency
create sink s_b into t_a as select v from t_b;

statement ok
drop sink s_a;

statement ok
drop table t_b;

statement ok
drop materialized view m_a;

statement ok
drop table t_a;

# multi sinks

statement ok
Expand Down

0 comments on commit 696a904

Please sign in to comment.