From b89561c0770b512c99d1813aa81e5a5705c5f532 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 16 Jan 2023 14:12:44 +0800 Subject: [PATCH] test: add test case for tsma --- tests/script/tsim/sma/tsmaCreateInsertQuery.sim | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/script/tsim/sma/tsmaCreateInsertQuery.sim b/tests/script/tsim/sma/tsmaCreateInsertQuery.sim index 8aadfb881b..27f4a475d2 100644 --- a/tests/script/tsim/sma/tsmaCreateInsertQuery.sim +++ b/tests/script/tsim/sma/tsmaCreateInsertQuery.sim @@ -32,7 +32,8 @@ sql insert into ct1 values('2022-10-19 09:55:46.682', 11, 2.1, 3.1,"b","n1")('20 print =============== create sma index from super table sql create sma index sma_index_name1 on stb function(max(c1),max(c2),min(c1)) interval(5m,10s) sliding(5m) watermark 1s max_delay 1s -sql create sma index sma_index_name2 on stb function(sum(c1),first(c1), last(c1), first(c4),last(c4),count(c4),first(c5),last(c5),count(c5),apercentile(c1,80,"t-digest"), avg(c2),count(c3), spread(c3), stddev(c2), hyperloglog(c2)) interval(5m,10s) sliding(5m); +sql create sma index sma_index_name2 on stb function(sum(c1),first(c1), last(c1), first(c4),last(c4),count(c4),first(c5),last(c5),count(c5),apercentile(c1,80,"t-digest"), avg(c2),count(c3), spread(c3), stddev(c2), hyperloglog(c2), hyperloglog(c4), hyperloglog(c5)) interval(5m,10s) sliding(5m); +# for varchar/binary sql_error create sma index sma_index_name3 on stb function(sum(c4)) interval(5m,10s) sliding(5m); sql_error create sma index sma_index_name3 on stb function(min(c4)) interval(5m,10s) sliding(5m); sql_error create sma index sma_index_name3 on stb function(max(c4)) interval(5m,10s) sliding(5m); @@ -40,16 +41,14 @@ sql_error create sma index sma_index_name3 on stb function(avg(c4)) interval(5m, sql_error create sma index sma_index_name3 on stb function(apercentile(c4)) interval(5m,10s) sliding(5m); sql_error create sma index sma_index_name3 on stb function(spread(c4)) interval(5m,10s) sliding(5m); sql_error create sma index sma_index_name3 on stb function(stddev(c4)) interval(5m,10s) sliding(5m); -sql_error create sma index sma_index_name3 on stb function(stddev(c4)) interval(5m,10s) sliding(5m); - +# for nchar sql_error create sma index sma_index_name3 on stb function(sum(c5)) interval(5m,10s) sliding(5m); sql_error create sma index sma_index_name3 on stb function(min(c5)) interval(5m,10s) sliding(5m); sql_error create sma index sma_index_name3 on stb function(max(c5)) interval(5m,10s) sliding(5m); -sql_error create sma index sma_index_name3 on stb function(avg(c4)) interval(5m,10s) sliding(5m); -sql_error create sma index sma_index_name3 on stb function(apercentile(c4)) interval(5m,10s) sliding(5m); -sql_error create sma index sma_index_name3 on stb function(spread(c4)) interval(5m,10s) sliding(5m); -sql_error create sma index sma_index_name3 on stb function(stddev(c4)) interval(5m,10s) sliding(5m); -sql_error create sma index sma_index_name3 on stb function(stddev(c4)) interval(5m,10s) sliding(5m); +sql_error create sma index sma_index_name3 on stb function(avg(c5)) interval(5m,10s) sliding(5m); +sql_error create sma index sma_index_name3 on stb function(apercentile(c5)) interval(5m,10s) sliding(5m); +sql_error create sma index sma_index_name3 on stb function(spread(c5)) interval(5m,10s) sliding(5m); +sql_error create sma index sma_index_name3 on stb function(stddev(c5)) interval(5m,10s) sliding(5m); print =============== trigger stream to execute sma aggr task and insert sma data into sma store sql insert into ct1 values('2022-10-19 09:55:50.682', 20, 20.0, 30.0,"e","n5") -- GitLab