Skip to content

Commit

Permalink
add tests for show create source
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Jan 6, 2025
1 parent 71d20e0 commit aad92f1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions e2e_test/source_inline/kafka/protobuf/alter_source.slt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ FORMAT PLAIN ENCODE PROTOBUF(
message = 'test.User'
);

query T
SELECT SUBSTRING(definition, 1, POSITION(' WITH' IN definition) - 1) FROM rw_sources WHERE name = 'src_user';
----
CREATE SOURCE src_user (id INT, name CHARACTER VARYING, address CHARACTER VARYING, city CHARACTER VARYING, gender CHARACTER VARYING, sc STRUCT<file_name CHARACTER VARYING>) INCLUDE timestamp

statement ok
CREATE MATERIALIZED VIEW mv_user AS SELECT * FROM src_user;

Expand Down Expand Up @@ -54,6 +59,11 @@ sleep 5s
statement ok
ALTER SOURCE src_user REFRESH SCHEMA;

query T
SELECT SUBSTRING(definition, 1, POSITION(' WITH' IN definition) - 1) FROM rw_sources WHERE name = 'src_user';
----
CREATE SOURCE src_user (id INT, name CHARACTER VARYING, address CHARACTER VARYING, city CHARACTER VARYING, gender CHARACTER VARYING, sc STRUCT<file_name CHARACTER VARYING>, age INT) INCLUDE timestamp

statement ok
CREATE MATERIALIZED VIEW mv_user_more AS SELECT * FROM src_user;

Expand Down

0 comments on commit aad92f1

Please sign in to comment.