Skip to content

Commit

Permalink
test schema change & sink-into ctas
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Jan 15, 2025
1 parent f05d4c9 commit 0759bc0
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
18 changes: 18 additions & 0 deletions e2e_test/ddl/show_purify.slt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,23 @@ show create table ctas;
----
public.ctas CREATE TABLE ctas (v0 INT, v1 NUMERIC, v2 TIMESTAMP, v3 TIMESTAMP WITH TIME ZONE, v4 CHARACTER VARYING[], v5 STRUCT<i BIGINT, j STRUCT<a BIGINT, b CHARACTER VARYING>>, v6 rw_int256, v7 MAP(CHARACTER VARYING,INT))

statement ok
alter table ctas add column v8 double;

# Show that we can add or drop columns to the CTAS table.

query TT
show create table ctas;
----
public.ctas CREATE TABLE ctas (v0 INT, v1 NUMERIC, v2 TIMESTAMP, v3 TIMESTAMP WITH TIME ZONE, v4 CHARACTER VARYING[], v5 STRUCT<i BIGINT, j STRUCT<a BIGINT, b CHARACTER VARYING>>, v6 rw_int256, v7 MAP(CHARACTER VARYING,INT), v8 DOUBLE)

statement ok
alter table ctas drop column v0;

query TT
show create table ctas;
----
public.ctas CREATE TABLE ctas (v1 NUMERIC, v2 TIMESTAMP, v3 TIMESTAMP WITH TIME ZONE, v4 CHARACTER VARYING[], v5 STRUCT<i BIGINT, j STRUCT<a BIGINT, b CHARACTER VARYING>>, v6 rw_int256, v7 MAP(CHARACTER VARYING,INT), v8 DOUBLE)

statement ok
drop table ctas;
25 changes: 25 additions & 0 deletions e2e_test/sink/sink_into_table/ctas.slt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
statement ok
SET RW_IMPLICIT_FLUSH TO true;

statement ok
create table ctas as select 1 as v;

query I rowsort
select * from ctas;
----
1

statement ok
create sink sk into ctas as select 2 as v with (type = 'append-only');

query I rowsort
select * from ctas;
----
1
2

statement ok
drop sink sk;

statement ok
drop table ctas;

0 comments on commit 0759bc0

Please sign in to comment.