From cbbee64db3bf937341e696d65bdeba73db477d2b Mon Sep 17 00:00:00 2001 From: Eric Fu Date: Wed, 13 Sep 2023 14:52:13 +0800 Subject: [PATCH] test: add an slt test for select with eowc (#12236) --- e2e_test/streaming/eowc/eowc_select.slt | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 e2e_test/streaming/eowc/eowc_select.slt diff --git a/e2e_test/streaming/eowc/eowc_select.slt b/e2e_test/streaming/eowc/eowc_select.slt new file mode 100644 index 0000000000000..6af9b78028623 --- /dev/null +++ b/e2e_test/streaming/eowc/eowc_select.slt @@ -0,0 +1,56 @@ +statement ok +set RW_IMPLICIT_FLUSH to true; + +statement ok +set streaming_parallelism = 1; + +statement ok +create table t ( + tm timestamp, + foo int, + watermark for tm as tm - interval '5 minutes' +) append only; + +statement ok +set streaming_parallelism = 0; + +statement ok +create materialized view mv as +select tm, foo from t +emit on window close; + +statement ok +insert into t values + ('2023-05-06 16:51:00', 1) +, ('2023-05-06 16:56:00', 8) +, ('2023-05-06 17:30:00', 3) +, ('2023-05-06 17:59:00', 4) +, ('2023-05-06 18:01:00', 6) +; + +query TI +select * from mv order by tm; +---- +2023-05-06 16:51:00 1 +2023-05-06 16:56:00 8 +2023-05-06 17:30:00 3 + +statement ok +insert into t values + ('2023-05-06 18:10:00', 7) +; + +query TI +select * from mv order by tm; +---- +2023-05-06 16:51:00 1 +2023-05-06 16:56:00 8 +2023-05-06 17:30:00 3 +2023-05-06 17:59:00 4 +2023-05-06 18:01:00 6 + +statement ok +drop materialized view mv; + +statement ok +drop table t;