From 1ca5ea4672e8318b8617b7a3d5f9e407c80d9317 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Mon, 29 Jan 2024 16:03:37 +0800 Subject: [PATCH] add e2e tests Signed-off-by: Richard Chien --- .../batch/basic/cross_check.slt.part | 40 +++++++++++++ .../generated/batch/basic/mod.slt.part | 35 ++++++++++++ .../generated/batch/basic/setup.slt.part | 56 +++++++++++++++++++ .../generated/batch/basic/teardown.slt.part | 17 +++++- .../streaming/basic/cross_check.slt.part | 40 +++++++++++++ .../generated/streaming/basic/mod.slt.part | 35 ++++++++++++ .../generated/streaming/basic/setup.slt.part | 56 +++++++++++++++++++ .../streaming/basic/teardown.slt.part | 17 +++++- .../templates/basic/cross_check.slt.part | 40 +++++++++++++ .../over_window/templates/basic/mod.slt.part | 35 ++++++++++++ .../templates/basic/setup.slt.part | 56 +++++++++++++++++++ .../templates/basic/teardown.slt.part | 17 +++++- 12 files changed, 441 insertions(+), 3 deletions(-) diff --git a/e2e_test/over_window/generated/batch/basic/cross_check.slt.part b/e2e_test/over_window/generated/batch/basic/cross_check.slt.part index 34ef01e43b837..764a60cfba86e 100644 --- a/e2e_test/over_window/generated/batch/basic/cross_check.slt.part +++ b/e2e_test/over_window/generated/batch/basic/cross_check.slt.part @@ -21,6 +21,16 @@ select from v_a natural join v_c; ---- +query i +select + id, out1, out10, out11 +from v_a_d +except +select + id, out1, out10, out11 +from v_a natural join v_d; +---- + query i select id, out3, out4, out7, out8, out9 @@ -31,6 +41,26 @@ select from v_b natural join v_c; ---- +query i +select + id, out3, out4, out10, out11 +from v_b_d +except +select + id, out3, out4, out10, out11 +from v_b natural join v_d; +---- + +query i +select + id, out7, out8, out9, out10, out11 +from v_c_d +except +select + id, out7, out8, out9, out10, out11 +from v_c natural join v_d; +---- + query i select id, out1, out2, out3, out4, out5, out6, out7, out8, out9 @@ -40,3 +70,13 @@ select id, out1, out2, out3, out4, out5, out6, out7, out8, out9 from v_a natural join v_b natural join v_c; ---- + +query i +select + id, out1, out2, out3, out4, out5, out6, out7, out8, out9, out10, out11 +from v_a_b_c_d +except +select + id, out1, out2, out3, out4, out5, out6, out7, out8, out9, out10, out11 +from v_a natural join v_b natural join v_c natural join v_d; +---- diff --git a/e2e_test/over_window/generated/batch/basic/mod.slt.part b/e2e_test/over_window/generated/batch/basic/mod.slt.part index a8c74b16bf790..1c5ff0f9b460c 100644 --- a/e2e_test/over_window/generated/batch/basic/mod.slt.part +++ b/e2e_test/over_window/generated/batch/basic/mod.slt.part @@ -35,6 +35,14 @@ select * from v_c order by id; 100003 100 208 2 723 807 723 NULL NULL NULL NULL 100004 103 200 2 702 808 702 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 2124 +100002 100 200 2 700 806 1 2124 +100003 100 208 2 723 807 1 2124 +100004 103 200 2 702 808 2 702 + include ./cross_check.slt.part statement ok @@ -72,6 +80,16 @@ select * from v_c order by id; 100005 100 200 3 717 810 717 700 700 NULL NULL 100006 105 204 5 703 828 703 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 2124 +100002 100 200 2 700 806 1 2841 +100003 100 208 2 723 807 1 2841 +100004 103 200 2 702 808 2 702 +100005 100 200 3 717 810 1 2140 +100006 105 204 5 703 828 5 703 + include ./cross_check.slt.part statement ok @@ -113,6 +131,16 @@ select * from v_c order by id; 100005 100 200 1 717 810 717 723 701 806 806 100006 105 204 5 703 828 703 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 2940 +100002 100 200 2 799 806 1 2940 +100003 100 200 2 723 807 1 2940 +100004 103 200 2 702 808 2 702 +100005 100 200 1 717 810 1 2940 +100006 105 204 5 703 828 5 703 + include ./cross_check.slt.part statement ok @@ -139,6 +167,13 @@ select * from v_c order by id; 100005 100 200 1 717 810 717 701 701 NULL NULL 100006 105 204 5 703 828 703 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 1418 +100005 100 200 1 717 810 1 1418 +100006 105 204 5 703 828 5 703 + include ./cross_check.slt.part include ./teardown.slt.part diff --git a/e2e_test/over_window/generated/batch/basic/setup.slt.part b/e2e_test/over_window/generated/batch/basic/setup.slt.part index 2ffc1b055334d..578a43df88113 100644 --- a/e2e_test/over_window/generated/batch/basic/setup.slt.part +++ b/e2e_test/over_window/generated/batch/basic/setup.slt.part @@ -40,6 +40,15 @@ select , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; +# range frame +statement ok +create view v_d as +select + * + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + statement ok create view v_a_b as select @@ -59,6 +68,15 @@ select , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; +statement ok +create view v_a_d as +select + * + , first_value(v1) over (partition by p1, p2 order by time, id rows 3 preceding) as out1 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + statement ok create view v_b_c as select @@ -70,6 +88,27 @@ select , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; +statement ok +create view v_b_d as +select + * + , sum(v1) over (partition by p1, p2 order by time, id rows between unbounded preceding and current row) as out3 + , min(v1) over (partition by p1, p2 order by time, id rows between current row and unbounded following) as out4 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + +statement ok +create view v_c_d as +select + * + , lag(v1) over (partition by p1, p2 order by time, id) as out7 + , lead(v2, 1) over (partition by p1, p2 order by time, id) as out8 + , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + statement ok create view v_a_b_c as select @@ -84,3 +123,20 @@ select , lead(v2, 1) over (partition by p1, p2 order by time, id) as out8 , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; + +statement ok +create view v_a_b_c_d as +select + * + , first_value(v1) over (partition by p1, p2 order by time, id rows 3 preceding) as out1 + , avg(v1) over (partition by p1) as out2 + , sum(v1) over (partition by p1, p2 order by time, id rows between unbounded preceding and current row) as out3 + , min(v1) over (partition by p1, p2 order by time, id rows between current row and unbounded following) as out4 + , lag(v1, 0) over (partition by p1 order by id) as out5 + , lag(v1, 1) over (partition by p1, p2 order by id) as out6 + , lag(v1) over (partition by p1, p2 order by time, id) as out7 + , lead(v2, 1) over (partition by p1, p2 order by time, id) as out8 + , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; diff --git a/e2e_test/over_window/generated/batch/basic/teardown.slt.part b/e2e_test/over_window/generated/batch/basic/teardown.slt.part index 97f416dd49c9e..b0314f2ce346b 100644 --- a/e2e_test/over_window/generated/batch/basic/teardown.slt.part +++ b/e2e_test/over_window/generated/batch/basic/teardown.slt.part @@ -9,17 +9,32 @@ drop view v_b; statement ok drop view v_c; +statement ok +drop view v_d; + statement ok drop view v_a_b; +statement ok +drop view v_a_c; + +statement ok +drop view v_a_d; + statement ok drop view v_b_c; statement ok -drop view v_a_c; +drop view v_b_d; + +statement ok +drop view v_c_d; statement ok drop view v_a_b_c; +statement ok +drop view v_a_b_c_d; + statement ok drop table t; diff --git a/e2e_test/over_window/generated/streaming/basic/cross_check.slt.part b/e2e_test/over_window/generated/streaming/basic/cross_check.slt.part index 34ef01e43b837..764a60cfba86e 100644 --- a/e2e_test/over_window/generated/streaming/basic/cross_check.slt.part +++ b/e2e_test/over_window/generated/streaming/basic/cross_check.slt.part @@ -21,6 +21,16 @@ select from v_a natural join v_c; ---- +query i +select + id, out1, out10, out11 +from v_a_d +except +select + id, out1, out10, out11 +from v_a natural join v_d; +---- + query i select id, out3, out4, out7, out8, out9 @@ -31,6 +41,26 @@ select from v_b natural join v_c; ---- +query i +select + id, out3, out4, out10, out11 +from v_b_d +except +select + id, out3, out4, out10, out11 +from v_b natural join v_d; +---- + +query i +select + id, out7, out8, out9, out10, out11 +from v_c_d +except +select + id, out7, out8, out9, out10, out11 +from v_c natural join v_d; +---- + query i select id, out1, out2, out3, out4, out5, out6, out7, out8, out9 @@ -40,3 +70,13 @@ select id, out1, out2, out3, out4, out5, out6, out7, out8, out9 from v_a natural join v_b natural join v_c; ---- + +query i +select + id, out1, out2, out3, out4, out5, out6, out7, out8, out9, out10, out11 +from v_a_b_c_d +except +select + id, out1, out2, out3, out4, out5, out6, out7, out8, out9, out10, out11 +from v_a natural join v_b natural join v_c natural join v_d; +---- diff --git a/e2e_test/over_window/generated/streaming/basic/mod.slt.part b/e2e_test/over_window/generated/streaming/basic/mod.slt.part index a8c74b16bf790..1c5ff0f9b460c 100644 --- a/e2e_test/over_window/generated/streaming/basic/mod.slt.part +++ b/e2e_test/over_window/generated/streaming/basic/mod.slt.part @@ -35,6 +35,14 @@ select * from v_c order by id; 100003 100 208 2 723 807 723 NULL NULL NULL NULL 100004 103 200 2 702 808 702 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 2124 +100002 100 200 2 700 806 1 2124 +100003 100 208 2 723 807 1 2124 +100004 103 200 2 702 808 2 702 + include ./cross_check.slt.part statement ok @@ -72,6 +80,16 @@ select * from v_c order by id; 100005 100 200 3 717 810 717 700 700 NULL NULL 100006 105 204 5 703 828 703 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 2124 +100002 100 200 2 700 806 1 2841 +100003 100 208 2 723 807 1 2841 +100004 103 200 2 702 808 2 702 +100005 100 200 3 717 810 1 2140 +100006 105 204 5 703 828 5 703 + include ./cross_check.slt.part statement ok @@ -113,6 +131,16 @@ select * from v_c order by id; 100005 100 200 1 717 810 717 723 701 806 806 100006 105 204 5 703 828 703 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 2940 +100002 100 200 2 799 806 1 2940 +100003 100 200 2 723 807 1 2940 +100004 103 200 2 702 808 2 702 +100005 100 200 1 717 810 1 2940 +100006 105 204 5 703 828 5 703 + include ./cross_check.slt.part statement ok @@ -139,6 +167,13 @@ select * from v_c order by id; 100005 100 200 1 717 810 717 701 701 NULL NULL 100006 105 204 5 703 828 703 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 1418 +100005 100 200 1 717 810 1 1418 +100006 105 204 5 703 828 5 703 + include ./cross_check.slt.part include ./teardown.slt.part diff --git a/e2e_test/over_window/generated/streaming/basic/setup.slt.part b/e2e_test/over_window/generated/streaming/basic/setup.slt.part index cc46c4066f0f4..b4457cde0419b 100644 --- a/e2e_test/over_window/generated/streaming/basic/setup.slt.part +++ b/e2e_test/over_window/generated/streaming/basic/setup.slt.part @@ -40,6 +40,15 @@ select , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; +# range frame +statement ok +create materialized view v_d as +select + * + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + statement ok create materialized view v_a_b as select @@ -59,6 +68,15 @@ select , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; +statement ok +create materialized view v_a_d as +select + * + , first_value(v1) over (partition by p1, p2 order by time, id rows 3 preceding) as out1 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + statement ok create materialized view v_b_c as select @@ -70,6 +88,27 @@ select , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; +statement ok +create materialized view v_b_d as +select + * + , sum(v1) over (partition by p1, p2 order by time, id rows between unbounded preceding and current row) as out3 + , min(v1) over (partition by p1, p2 order by time, id rows between current row and unbounded following) as out4 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + +statement ok +create materialized view v_c_d as +select + * + , lag(v1) over (partition by p1, p2 order by time, id) as out7 + , lead(v2, 1) over (partition by p1, p2 order by time, id) as out8 + , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + statement ok create materialized view v_a_b_c as select @@ -84,3 +123,20 @@ select , lead(v2, 1) over (partition by p1, p2 order by time, id) as out8 , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; + +statement ok +create materialized view v_a_b_c_d as +select + * + , first_value(v1) over (partition by p1, p2 order by time, id rows 3 preceding) as out1 + , avg(v1) over (partition by p1) as out2 + , sum(v1) over (partition by p1, p2 order by time, id rows between unbounded preceding and current row) as out3 + , min(v1) over (partition by p1, p2 order by time, id rows between current row and unbounded following) as out4 + , lag(v1, 0) over (partition by p1 order by id) as out5 + , lag(v1, 1) over (partition by p1, p2 order by id) as out6 + , lag(v1) over (partition by p1, p2 order by time, id) as out7 + , lead(v2, 1) over (partition by p1, p2 order by time, id) as out8 + , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; diff --git a/e2e_test/over_window/generated/streaming/basic/teardown.slt.part b/e2e_test/over_window/generated/streaming/basic/teardown.slt.part index 2089fefcac249..041677a88c268 100644 --- a/e2e_test/over_window/generated/streaming/basic/teardown.slt.part +++ b/e2e_test/over_window/generated/streaming/basic/teardown.slt.part @@ -9,17 +9,32 @@ drop materialized view v_b; statement ok drop materialized view v_c; +statement ok +drop materialized view v_d; + statement ok drop materialized view v_a_b; +statement ok +drop materialized view v_a_c; + +statement ok +drop materialized view v_a_d; + statement ok drop materialized view v_b_c; statement ok -drop materialized view v_a_c; +drop materialized view v_b_d; + +statement ok +drop materialized view v_c_d; statement ok drop materialized view v_a_b_c; +statement ok +drop materialized view v_a_b_c_d; + statement ok drop table t; diff --git a/e2e_test/over_window/templates/basic/cross_check.slt.part b/e2e_test/over_window/templates/basic/cross_check.slt.part index b2a8041257143..0731d52637f45 100644 --- a/e2e_test/over_window/templates/basic/cross_check.slt.part +++ b/e2e_test/over_window/templates/basic/cross_check.slt.part @@ -19,6 +19,16 @@ select from v_a natural join v_c; ---- +query i +select + id, out1, out10, out11 +from v_a_d +except +select + id, out1, out10, out11 +from v_a natural join v_d; +---- + query i select id, out3, out4, out7, out8, out9 @@ -29,6 +39,26 @@ select from v_b natural join v_c; ---- +query i +select + id, out3, out4, out10, out11 +from v_b_d +except +select + id, out3, out4, out10, out11 +from v_b natural join v_d; +---- + +query i +select + id, out7, out8, out9, out10, out11 +from v_c_d +except +select + id, out7, out8, out9, out10, out11 +from v_c natural join v_d; +---- + query i select id, out1, out2, out3, out4, out5, out6, out7, out8, out9 @@ -38,3 +68,13 @@ select id, out1, out2, out3, out4, out5, out6, out7, out8, out9 from v_a natural join v_b natural join v_c; ---- + +query i +select + id, out1, out2, out3, out4, out5, out6, out7, out8, out9, out10, out11 +from v_a_b_c_d +except +select + id, out1, out2, out3, out4, out5, out6, out7, out8, out9, out10, out11 +from v_a natural join v_b natural join v_c natural join v_d; +---- diff --git a/e2e_test/over_window/templates/basic/mod.slt.part b/e2e_test/over_window/templates/basic/mod.slt.part index 421f5a911f468..d2ed6fdc1e107 100644 --- a/e2e_test/over_window/templates/basic/mod.slt.part +++ b/e2e_test/over_window/templates/basic/mod.slt.part @@ -33,6 +33,14 @@ select * from v_c order by id; 100003 100 208 2 723 807 723 NULL NULL NULL NULL 100004 103 200 2 702 808 702 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 2124 +100002 100 200 2 700 806 1 2124 +100003 100 208 2 723 807 1 2124 +100004 103 200 2 702 808 2 702 + include ./cross_check.slt.part statement ok @@ -70,6 +78,16 @@ select * from v_c order by id; 100005 100 200 3 717 810 717 700 700 NULL NULL 100006 105 204 5 703 828 703 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 2124 +100002 100 200 2 700 806 1 2841 +100003 100 208 2 723 807 1 2841 +100004 103 200 2 702 808 2 702 +100005 100 200 3 717 810 1 2140 +100006 105 204 5 703 828 5 703 + include ./cross_check.slt.part statement ok @@ -111,6 +129,16 @@ select * from v_c order by id; 100005 100 200 1 717 810 717 723 701 806 806 100006 105 204 5 703 828 703 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 2940 +100002 100 200 2 799 806 1 2940 +100003 100 200 2 723 807 1 2940 +100004 103 200 2 702 808 2 702 +100005 100 200 1 717 810 1 2940 +100006 105 204 5 703 828 5 703 + include ./cross_check.slt.part statement ok @@ -137,6 +165,13 @@ select * from v_c order by id; 100005 100 200 1 717 810 717 701 701 NULL NULL 100006 105 204 5 703 828 703 NULL NULL NULL NULL +query iiiiiiii +select * from v_d order by id; +---- +100001 100 200 1 701 805 1 1418 +100005 100 200 1 717 810 1 1418 +100006 105 204 5 703 828 5 703 + include ./cross_check.slt.part include ./teardown.slt.part diff --git a/e2e_test/over_window/templates/basic/setup.slt.part b/e2e_test/over_window/templates/basic/setup.slt.part index d989d50029430..f08fc7e4ea20d 100644 --- a/e2e_test/over_window/templates/basic/setup.slt.part +++ b/e2e_test/over_window/templates/basic/setup.slt.part @@ -38,6 +38,15 @@ select , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; +# range frame +statement ok +create $view_type v_d as +select + * + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + statement ok create $view_type v_a_b as select @@ -57,6 +66,15 @@ select , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; +statement ok +create $view_type v_a_d as +select + * + , first_value(v1) over (partition by p1, p2 order by time, id rows 3 preceding) as out1 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + statement ok create $view_type v_b_c as select @@ -68,6 +86,27 @@ select , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; +statement ok +create $view_type v_b_d as +select + * + , sum(v1) over (partition by p1, p2 order by time, id rows between unbounded preceding and current row) as out3 + , min(v1) over (partition by p1, p2 order by time, id rows between current row and unbounded following) as out4 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + +statement ok +create $view_type v_c_d as +select + * + , lag(v1) over (partition by p1, p2 order by time, id) as out7 + , lead(v2, 1) over (partition by p1, p2 order by time, id) as out8 + , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; + statement ok create $view_type v_a_b_c as select @@ -82,3 +121,20 @@ select , lead(v2, 1) over (partition by p1, p2 order by time, id) as out8 , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 from t; + +statement ok +create $view_type v_a_b_c_d as +select + * + , first_value(v1) over (partition by p1, p2 order by time, id rows 3 preceding) as out1 + , avg(v1) over (partition by p1) as out2 + , sum(v1) over (partition by p1, p2 order by time, id rows between unbounded preceding and current row) as out3 + , min(v1) over (partition by p1, p2 order by time, id rows between current row and unbounded following) as out4 + , lag(v1, 0) over (partition by p1 order by id) as out5 + , lag(v1, 1) over (partition by p1, p2 order by id) as out6 + , lag(v1) over (partition by p1, p2 order by time, id) as out7 + , lead(v2, 1) over (partition by p1, p2 order by time, id) as out8 + , lead(v2, 2) over (partition by p1, p2 order by v1, v2) as out9 + , last_value(time) over (partition by p1 order by time desc range between current row and 2 following) as out10 + , sum(v1) over (partition by p1 order by time range between 1 preceding and 1 following) as out11 +from t; diff --git a/e2e_test/over_window/templates/basic/teardown.slt.part b/e2e_test/over_window/templates/basic/teardown.slt.part index 89915395703ad..a9bf9252c385a 100644 --- a/e2e_test/over_window/templates/basic/teardown.slt.part +++ b/e2e_test/over_window/templates/basic/teardown.slt.part @@ -7,17 +7,32 @@ drop $view_type v_b; statement ok drop $view_type v_c; +statement ok +drop $view_type v_d; + statement ok drop $view_type v_a_b; +statement ok +drop $view_type v_a_c; + +statement ok +drop $view_type v_a_d; + statement ok drop $view_type v_b_c; statement ok -drop $view_type v_a_c; +drop $view_type v_b_d; + +statement ok +drop $view_type v_c_d; statement ok drop $view_type v_a_b_c; +statement ok +drop $view_type v_a_b_c_d; + statement ok drop table t;