diff --git a/tests/script/tsim/parser/col_arithmetic_operation.sim b/tests/script/tsim/parser/col_arithmetic_operation.sim index 9a2ba34c85e552585770bb42913b8c83ddd58131..a11b99d3d60329f33bd5e191d32ce1af4be772b8 100644 --- a/tests/script/tsim/parser/col_arithmetic_operation.sim +++ b/tests/script/tsim/parser/col_arithmetic_operation.sim @@ -9,7 +9,7 @@ $dbPrefix = ca_db $tbPrefix = ca_tb $stbPrefix = ca_stb $tbNum = 10 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum $ts0 = 1537146000000 $delta = 600000 @@ -18,6 +18,7 @@ $i = 0 $db = $dbPrefix . $i $stb = $stbPrefix . $i +print drop database $db -x step1 sql drop database $db -x step1 step1: sql create database $db diff --git a/tests/script/tsim/parser/col_arithmetic_query.sim b/tests/script/tsim/parser/col_arithmetic_query.sim index b77dcbe4982744a59b61687f70d5a650229361e4..1537db9a8365b0eb104f62ae74367d53bf9a10bd 100644 --- a/tests/script/tsim/parser/col_arithmetic_query.sim +++ b/tests/script/tsim/parser/col_arithmetic_query.sim @@ -4,7 +4,7 @@ $dbPrefix = ca_db $tbPrefix = ca_tb $stbPrefix = ca_stb -$rowNum = 10000 +$rowNum = 1000 $i = 0 $db = $dbPrefix . $i @@ -33,7 +33,7 @@ endi # asc/desc order [d.2] ====================================================== sql select c1 *( 2 / 3 ), c1/c1 from $tb order by ts asc; -if $rows != 10000 then +if $rows != 1000 then return -1 endi if $data00 != 0.000000000 then @@ -57,7 +57,7 @@ if $data91 != 1.000000000 then endi sql select (c1 * 2) % 7.9, c1*1, c1*1*1, c1*c1, c1*c1*c1 from $tb order by ts desc; -if $rows != 10000 then +if $rows != 1000 then return -1 endi if $data00 != 2.200000000 then @@ -151,7 +151,7 @@ sql select top(c1,1) - 88 from $tb # all data types [d.6] ================================================================ sql select c2-c1*1.1, c3/c2, c4*c3, c5%c4, (c6+c4)%22, c2-c2 from $tb -if $rows != 10000 then +if $rows != 1000 then return -1 endi if $data00 != 0.000000000 then @@ -221,7 +221,7 @@ if $data90 != 76.000000000 then return -1 endi -sql select c4 / 99.123 from $tb limit 10 offset 9999; +sql select c4 / 99.123 from $tb limit 10 offset 999; if $rows != 1 then return -1 endi @@ -237,7 +237,7 @@ sql_error select c2-c2, c3-c4, c5%c3 from $tb fill(value, 12); # constant column. [d.13]============================================================== sql select c1, c2+c6, 12.9876545678, 1, 1.1 from $tb -if $rows != 10000 then +if $rows != 1000 then return -1 endi if $data00 != 0 then @@ -261,7 +261,7 @@ endi # column value filter [d.14]=========================================================== sql select c1, c2+c6, 12.9876545678, 1, 1.1 from $tb where c1<2 -if $rows != 2000 then +if $rows != 200 then return -1 endi if $data00 != 0 then @@ -338,13 +338,14 @@ sql select (count(c1) * 2) % 7.9, (count(c1) * 2), ( count(1)*2) from $stb if $rows != 1 then return -1 endi -if $data00 != 1.800000000 then +print $data00 +if $data00 != 6.500000000 then return -1 endi -if $data01 != 100000.000000000 then +if $data01 != 10000.000000000 then return -1 endi -if $data02 != 200000.000000000 then +if $data02 != 20000.000000000 then return -1 endi @@ -371,7 +372,7 @@ endi if $data00 != 0.000000000 then return -1 endi -if $data01 != 225000.000000000 then +if $data01 != 22500.000000000 then return -1 endi if $data02 != 8.077777778 then @@ -383,7 +384,7 @@ endi if $data04 != 0.444444444 then return -1 endi -if $data05 != 450000.000000000 then +if $data05 != 45000.000000000 then return -1 endi @@ -484,10 +485,10 @@ endi if $data10 != 0.000000000 then return -1 endi -if $data20 != 0.997600000 then +if $data20 != 0.976000000 then return -1 endi -if $data90 != 7.980800000 then +if $data90 != 7.808000000 then return -1 endi @@ -496,7 +497,7 @@ sql select first(c6) - sum(c6) + 12 from $stb limit 12 offset 0; if $rows != 1 then return -1 endi -if $data00 != -449988.000000000 then +if $data00 != -44988.000000000 then return -1 endi @@ -546,7 +547,7 @@ endi # interval query [d.17]=============================================================== sql select avg(c2)*count(c2), sum(c3)-first(c3), last(c4)+9 from ca_stb0 interval(1s) -if $rows != 10000 then +if $rows != 1000 then return -1 endi diff --git a/tests/script/tsim/parser/commit.sim b/tests/script/tsim/parser/commit.sim index a9bf8b26ebda178ed789f3119eac7203a6889f9b..84610ad379e614bb50aefb90691fc10e287d8ba2 100644 --- a/tests/script/tsim/parser/commit.sim +++ b/tests/script/tsim/parser/commit.sim @@ -7,7 +7,7 @@ $dbPrefix = sc_db $tbPrefix = sc_tb $stbPrefix = sc_stb $tbNum = 10 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum $loops = 5 $log = 1 diff --git a/tests/script/tsim/parser/groupby.sim b/tests/script/tsim/parser/groupby.sim index 68e70c5765f0b2fc7631f2c6562f8157e6eaf0df..637b7553fd741d8bf89fce3baf67d817391ea0e5 100644 --- a/tests/script/tsim/parser/groupby.sim +++ b/tests/script/tsim/parser/groupby.sim @@ -7,7 +7,7 @@ $dbPrefix = group_db $tbPrefix = group_tb $mtPrefix = group_mt $tbNum = 8 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum print =============== groupby.sim @@ -88,7 +88,7 @@ if $row != 20 then return -1 endi -if $data00 != 100 then +if $data00 != 10 then return -1 endi @@ -96,7 +96,7 @@ if $data01 != 0 then return -1 endi -if $data10 != 100 then +if $data10 != 10 then return -1 endi @@ -186,7 +186,7 @@ if $data04 != 0.00000 then return -1 endi -if $data10 != 100 then +if $data10 != 10 then return -1 endi @@ -227,7 +227,7 @@ if $row != 20 then return -1 endi -if $data00 != 800 then +if $data00 != 80 then return -1 endi @@ -235,7 +235,7 @@ if $data01 != 0 then return -1 endi -if $data10 != 800 then +if $data10 != 80 then return -1 endi @@ -243,7 +243,7 @@ if $data11 != 1 then return -1 endi -if $data90 != 800 then +if $data90 != 80 then return -1 endi @@ -297,7 +297,7 @@ if $data00 != $data03 then return -1 endi -if $data01 != @70-01-01 08:01:49.900@ then +if $data01 != @70-01-01 08:01:40.900@ then return -1 endi @@ -305,7 +305,7 @@ if $data02 != @70-01-01 08:01:40.000@ then return -1 endi -if $data07 != 800 then +if $data07 != 80 then return -1 endi @@ -313,7 +313,7 @@ if $data10 != $data13 then return -1 endi -if $data11 != @70-01-01 08:01:49.901@ then +if $data11 != @70-01-01 08:01:40.901@ then return -1 endi @@ -321,7 +321,7 @@ if $data12 != @70-01-01 08:01:40.001@ then return -1 endi -if $data17 != 800 then +if $data17 != 80 then return -1 endi @@ -329,7 +329,7 @@ if $data90 != $data93 then return -1 endi -if $data91 != @70-01-01 08:01:49.909@ then +if $data91 != @70-01-01 08:01:40.909@ then return -1 endi @@ -337,11 +337,11 @@ if $data92 != @70-01-01 08:01:40.009@ then return -1 endi -if $data97 != 800 then +if $data97 != 80 then return -1 endi -if $data95 != 7200 then +if $data95 != 720 then return -1 endi @@ -358,7 +358,7 @@ if $data00 != 0 then return -1 endi -if $data11 != 800 then +if $data11 != 80 then return -1 endi @@ -372,7 +372,7 @@ if $data00 != 0 then return -1 endi -if $data01 != @70-01-01 08:01:49.900@ then +if $data01 != @70-01-01 08:01:40.900@ then return -1 endi @@ -389,13 +389,13 @@ if $data04 != 0 then return -1 endi -if $data06 != 100 then +if $data06 != 10 then return -1 endi sql select count(*),first(ts),last(ts),min(c3) from group_tb1 group by c4 order by c4; -if $rows != 10000 then +if $rows != 1000 then return -1 endi @@ -420,13 +420,13 @@ if $rows != 1 then return -1 endi -sql select count(*),first(ts),last(ts),min(c3) from group_tb1 group by c4 slimit 20 soffset 9990; +sql select count(*),first(ts),last(ts),min(c3) from group_tb1 group by c4 slimit 20 soffset 990; if $rows != 10 then return -1 endi sql select count(*),first(ts),last(ts),min(c3),max(c3),sum(c3),avg(c3),sum(c4)/count(c4) from group_tb1 group by c4; -if $rows != 10000 then +if $rows != 1000 then return -1 endi @@ -441,32 +441,32 @@ if $rows != 100 then return -1 endi -if $data00 != 100 then +if $data00 != 10 then return -1 endi -if $data01 != 495000 then +if $data01 != 4500 then return -1 endi -if $data02 != 100 then +if $data02 != 10 then return -1 endi -if $data03 != 4950.000000000 then - print expect 4950.000000000 , acutal $data03 +if $data03 != 450.000000000 then + print expect 450.000000000 , acutal $data03 return -1 endi -if $data10 != 100 then +if $data10 != 10 then return -1 endi -if $data11 != 495100 then +if $data11 != 4510 then return -1 endi -if $data13 != 4951.000000000 then +if $data13 != 451.000000000 then return -1 endi @@ -481,19 +481,19 @@ if $rows != 1 then return -1 endi -#if $data00 != 79200.000000000 then +#if $data00 != 2160.000000000 then # return -1 #endi -#if $data01 != @binary99@ then +#if $data01 != @binary27@ then # return -1 #endi -#if $data02 != 99.000000000 then +#if $data02 != 27.000000000 then # return -1 #endi -#if $data03 != 99.000000000 then +#if $data03 != 27.000000000 then # return -1 #endi @@ -503,7 +503,7 @@ if $rows != 100 then return -1 endi -if $data00 != 4851.000000000 then +if $data00 != 441.000000000 then return -1 endi @@ -511,19 +511,19 @@ if $data01 != 0 then return -1 endi -if $data02 != 9900 then +if $data02 != 900 then return -1 endi -if $data03 != 4950.000000000 then +if $data03 != 450.000000000 then return -1 endi -if $data04 != 2886.607004772 then +if $data04 != 287.228132327 then return -1 endi -if $data10 != 4852.000000000 then +if $data10 != 442.000000000 then return -1 endi @@ -531,15 +531,15 @@ if $data11 != 1 then return -1 endi -if $data12 != 9901 then +if $data12 != 901 then return -1 endi -if $data13 != 4951.000000000 then +if $data13 != 451.000000000 then return -1 endi -if $data14 != 2886.607004772 then +if $data14 != 287.228132327 then return -1 endi diff --git a/tests/script/tsim/parser/interp.sim b/tests/script/tsim/parser/interp.sim index e6512a22d79da5ca5970665f08e369e582eed361..f74a2dc6243ad6d2bf7acf3a5f57d80df3d53cbb 100644 --- a/tests/script/tsim/parser/interp.sim +++ b/tests/script/tsim/parser/interp.sim @@ -7,7 +7,7 @@ $dbPrefix = intp_db $tbPrefix = intp_tb $stbPrefix = intp_stb $tbNum = 4 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum $ts0 = 1537146000000 $delta = 600000 diff --git a/tests/script/tsim/parser/join_manyblocks.sim b/tests/script/tsim/parser/join_manyblocks.sim index 154316a03f694d7ea375f1cc7d3cc4ad903cd9b9..a40a75f50c54cb9ffdfed24edd2a7e03e0c13e5c 100644 --- a/tests/script/tsim/parser/join_manyblocks.sim +++ b/tests/script/tsim/parser/join_manyblocks.sim @@ -7,7 +7,7 @@ $dbPrefix = join_m_db $tbPrefix = join_tb $mtPrefix = join_mt $tbNum = 3 -$rowNum = 20000 +$rowNum = 2000 $totalNum = $tbNum * $rowNum print =============== join_manyBlocks.sim @@ -78,8 +78,8 @@ print ==============> td-3313 sql select join_mt0.ts,join_mt0.ts,join_mt0.t1 from join_mt0, join_mt1 where join_mt0.ts=join_mt1.ts and join_mt0.t1=join_mt1.t1; print $row -if $row != 60000 then - print expect 60000, actual: $row +if $row != 6000 then + print expect 6000, actual: $row return -1 endi diff --git a/tests/script/tsim/parser/limit1.sim b/tests/script/tsim/parser/limit1.sim index c35617fc4fc64cedbe667a4153bac1a9064f4a91..d1a75f3ba9603ff2d97a029258dc91f0fa097d43 100644 --- a/tests/script/tsim/parser/limit1.sim +++ b/tests/script/tsim/parser/limit1.sim @@ -7,7 +7,7 @@ $dbPrefix = lm1_db $tbPrefix = lm1_tb $stbPrefix = lm1_stb $tbNum = 10 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum $ts0 = 1537146000000 $delta = 600000 diff --git a/tests/script/tsim/parser/limit1_stb.sim b/tests/script/tsim/parser/limit1_stb.sim index be0963c0fdf3b15750512715b8fa752184436df6..1a5d57efbc339e2e2642da20777646af53dd97bb 100644 --- a/tests/script/tsim/parser/limit1_stb.sim +++ b/tests/script/tsim/parser/limit1_stb.sim @@ -4,7 +4,7 @@ $dbPrefix = lm1_db $tbPrefix = lm1_tb $stbPrefix = lm1_stb $tbNum = 10 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum $ts0 = 1537146000000 $delta = 600000 @@ -453,13 +453,14 @@ endi ### [TBASE-361] $offset = $rowNum / 2 $offset = $offset + 1 +print === select _wstart, max(c1), min(c2), avg(c3), count(c4), sum(c5), spread(c6), first(c7), last(c8), first(c9) from $stb where ts >= $ts0 and ts <= $tsu and t1 > 1 and t1 < 8 interval(5m) limit $offset offset $offset sql select _wstart, max(c1), min(c2), avg(c3), count(c4), sum(c5), spread(c6), first(c7), last(c8), first(c9) from $stb where ts >= $ts0 and ts <= $tsu and t1 > 1 and t1 < 8 interval(5m) limit $offset offset $offset $val = $rowNum - $offset if $rows != $val then print expect $val, actual:$rows return -1 endi -if $data00 != @18-10-22 02:30:00.000@ then +if $data00 != @18-09-20 20:30:00.000@ then return -1 endi if $data01 != 1 then diff --git a/tests/script/tsim/parser/limit1_tb.sim b/tests/script/tsim/parser/limit1_tb.sim index 0ba82654187ab773dd0d84d488e3e1b2e5f50381..e6407e3024e4747f591570689e2ce77c031158df 100644 --- a/tests/script/tsim/parser/limit1_tb.sim +++ b/tests/script/tsim/parser/limit1_tb.sim @@ -4,7 +4,7 @@ $dbPrefix = lm1_db $tbPrefix = lm1_tb $stbPrefix = lm1_stb $tbNum = 10 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum $ts0 = 1537146000000 $delta = 600000 @@ -13,7 +13,7 @@ $i = 0 $db = $dbPrefix . $i $stb = $stbPrefix . $i -print ====== use db +print ====== use $db sql use $db ##### select from table @@ -664,9 +664,9 @@ endi if $data21 != 4.027681991 then return -1 endi - +print select _wstart, count(c1), count(c2), count(c3), count(c4), count(c5), count(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(27m) sql select _wstart, count(c1), count(c2), count(c3), count(c4), count(c5), count(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(27m) -if $rows != 3704 then +if $rows != 371 then return -1 endi if $data01 != 2 then @@ -994,11 +994,14 @@ endi $offset = $rowNum / 10 $offset = $offset * 3 $offset = $offset - 1 + +print === select * from $tb where c1 < 5 and c1 > 1 order by ts asc limit 3 offset $offset sql select * from $tb where c1 < 5 and c1 > 1 order by ts asc limit 3 offset $offset if $rows != 1 then return -1 endi -if $data00 != @18-11-25 18:40:00.000@ then +print $data00 +if $data00 != @18-09-24 06:40:00.000@ then return -1 endi if $data01 != 4 then @@ -1012,19 +1015,19 @@ sql select * from $tb order by ts desc limit 5 if $rows != 5 then return -1 endi -if $data00 != @18-11-25 19:30:00.000@ then +if $data00 != @18-09-24 07:30:00.000@ then return -1 endi if $data01 != 9 then return -1 endi -if $data10 != @18-11-25 19:20:00.000@ then +if $data10 != @18-09-24 07:20:00.000@ then return -1 endi if $data12 != 8 then return -1 endi -if $data20 != @18-11-25 19:10:00.000@ then +if $data20 != @18-09-24 07:10:00.000@ then return -1 endi if $data23 != 7.00000 then @@ -1048,7 +1051,7 @@ endi if $data39 != nchar6 then return -1 endi -if $data40 != @18-11-25 18:50:00.000@ then +if $data40 != @18-09-24 06:50:00.000@ then return -1 endi @@ -1056,19 +1059,19 @@ sql select * from $tb order by ts desc limit 5 offset 1 if $rows != 5 then return -1 endi -if $data00 != @18-11-25 19:20:00.000@ then +if $data00 != @18-09-24 07:20:00.000@ then return -1 endi if $data01 != 8 then return -1 endi -if $data10 != @18-11-25 19:10:00.000@ then +if $data10 != @18-09-24 07:10:00.000@ then return -1 endi if $data12 != 7 then return -1 endi -if $data20 != @18-11-25 19:00:00.000@ then +if $data20 != @18-09-24 07:00:00.000@ then return -1 endi if $data23 != 6.00000 then @@ -1092,12 +1095,13 @@ endi if $data39 != nchar5 then return -1 endi -if $data40 != @18-11-25 18:40:00.000@ then +if $data40 != @18-09-24 06:40:00.000@ then return -1 endi $offset = $rowNum $offset = $offset - 2 +print ==== select * from $tb order by ts desc limit 5 offset $offset sql select * from $tb order by ts desc limit 5 offset $offset if $rows != 2 then return -1 @@ -1119,16 +1123,16 @@ sql select * from $tb where c1 < 8 order by ts desc limit 3 offset 2 if $rows != 3 then return -1 endi -if $data00 != @18-11-25 18:50:00.000@ then +if $data00 != @18-09-24 06:50:00.000@ then return -1 endi if $data01 != 5 then return -1 endi -if $data10 != @18-11-25 18:40:00.000@ then +if $data10 != @18-09-24 06:40:00.000@ then return -1 endi -if $data20 != @18-11-25 18:30:00.000@ then +if $data20 != @18-09-24 06:30:00.000@ then return -1 endi if $data12 != 4 then diff --git a/tests/script/tsim/parser/nestquery.sim b/tests/script/tsim/parser/nestquery.sim index 2a363de43df0f774cbbd6b163c3bfd550f10ea1d..c2189d0bddbe91d001ccca378214935df317f2a8 100644 --- a/tests/script/tsim/parser/nestquery.sim +++ b/tests/script/tsim/parser/nestquery.sim @@ -8,7 +8,7 @@ print ======================== dnode1 start $dbPrefix = nest_db $tbPrefix = nest_tb $mtPrefix = nest_mt -$tbNum = 10 +$tbNum = 3 $rowNum = 10000 $totalNum = $tbNum * $rowNum @@ -23,7 +23,7 @@ sql create database if not exists $db sql use $db sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int) -$half = $tbNum / 2 +$half = 2 $i = 0 while $i < $half @@ -69,7 +69,7 @@ sql select count(*) from (select count(*) from nest_mt0 group by tbname) if $rows != 1 then return -1 endi -if $data00 != 10 then +if $data00 != 4 then return -1 endi @@ -77,7 +77,7 @@ sql select count(*) from (select count(*) from nest_mt0 partition by tbname inte if $rows != 1 then return -1 endi -if $data00 != 170 then +if $data00 != 68 then return -1 endi @@ -85,7 +85,7 @@ sql select sum(a) from (select count(*) a from nest_mt0 partition by tbname inte if $rows != 1 then return -1 endi -if $data00 != 100000 then +if $data00 != 40000 then return -1 endi diff --git a/tests/script/tsim/parser/projection_limit_offset.sim b/tests/script/tsim/parser/projection_limit_offset.sim index 669ff3a179c67bce6970868b1fac1bbefccc9d0f..2d99b0a296621ca0b29f908dba8714afde47076c 100644 --- a/tests/script/tsim/parser/projection_limit_offset.sim +++ b/tests/script/tsim/parser/projection_limit_offset.sim @@ -7,7 +7,7 @@ $dbPrefix = group_db $tbPrefix = group_tb $mtPrefix = group_mt $tbNum = 8 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum print =============== projection_limit_offset.sim @@ -81,199 +81,199 @@ $ts2 = $tb2 . .ts sql select ts from group_mt0 print $rows -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' limit 8000 offset 0; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' limit 8000 offset 0; if $rows != 4008 then print expect 4008, actual:$rows return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' limit 8000 offset 1; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' limit 8000 offset 1; if $rows != 4007 then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' limit 8000 offset 101; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' limit 8000 offset 101; print $rows if $rows != 3907 then return -1 endi -if $data00 != @70-01-01 08:01:43.101@ then +if $data00 != @70-01-01 08:01:40.101@ then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' limit 8000 offset 902; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' limit 8000 offset 902; if $rows != 3106 then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' limit 8000 offset 400; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' limit 8000 offset 400; if $rows != 3608 then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' limit 8000 offset 4007; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' limit 8000 offset 4007; if $rows != 1 then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' limit 2000 offset 4008; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' limit 2000 offset 4008; if $rows != 0 then return -1 endi #==================================order by desc, multi vnode, limit/offset=================================== -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' order by ts desc limit 8000 offset 0; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' order by ts desc limit 8000 offset 0; if $rows != 4008 then return -1 endi -if $data00 != @70-01-01 08:01:43.500@ then +if $data00 != @70-01-01 08:01:40.500@ then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' order by ts desc limit 8000 offset 1; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' order by ts desc limit 8000 offset 1; if $rows != 4007 then return -1 endi -if $data00 != @70-01-01 08:01:43.500@ then +if $data00 != @70-01-01 08:01:40.500@ then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' order by ts desc limit 8000 offset 101; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' order by ts desc limit 8000 offset 101; print $rows if $rows != 3907 then return -1 endi -if $data00 != @70-01-01 08:01:43.488@ then +if $data00 != @70-01-01 08:01:40.488@ then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' order by ts desc limit 8000 offset 902; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' order by ts desc limit 8000 offset 902; if $rows != 3106 then return -1 endi -if $data00 != @70-01-01 08:01:43.388@ then +if $data00 != @70-01-01 08:01:40.388@ then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' order by ts desc limit 8000 offset 400; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' order by ts desc limit 8000 offset 400; if $rows != 3608 then return -1 endi -if $data00 != @70-01-01 08:01:43.450@ then +if $data00 != @70-01-01 08:01:40.450@ then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' order by ts desc limit 8000 offset 4007; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' order by ts desc limit 8000 offset 4007; if $rows != 1 then return -1 endi -if $data00 != @70-01-01 08:01:43.000@ then +if $data00 != @70-01-01 08:01:40.000@ then return -1 endi -sql select ts from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.500' order by ts desc limit 2000 offset 4008; +sql select ts from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.500' order by ts desc limit 2000 offset 4008; if $rows != 0 then return -1 endi #=================================single value filter====================================== -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts asc limit 10 offset 0; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts asc limit 10 offset 0; if $row != 8 then return -1 endi -if $data00 != @70-01-01 08:01:43.000@ then +if $data00 != @70-01-01 08:01:40.000@ then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts asc limit 10 offset 1; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts asc limit 10 offset 1; if $row != 7 then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts asc limit 10 offset 2; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts asc limit 10 offset 2; if $row != 6 then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts asc limit 10 offset 4; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts asc limit 10 offset 4; if $row != 4 then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts asc limit 10 offset 7; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts asc limit 10 offset 7; if $row != 1 then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts asc limit 10 offset 8; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts asc limit 10 offset 8; if $row != 0 then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts asc limit 10 offset 9; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts asc limit 10 offset 9; if $row != 0 then return -1 endi #===============================single value filter, order by desc============================ -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts desc limit 10 offset 0; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts desc limit 10 offset 0; if $row != 8 then return -1 endi -if $data00 != @70-01-01 08:01:43.000@ then +if $data00 != @70-01-01 08:01:40.000@ then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts desc limit 10 offset 1; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts desc limit 10 offset 1; if $row != 7 then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts desc limit 10 offset 2; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts desc limit 10 offset 2; if $row != 6 then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts desc limit 10 offset 4; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts desc limit 10 offset 4; if $row != 4 then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts desc limit 10 offset 7; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts desc limit 10 offset 7; if $row != 1 then return -1 endi -if $data00 != @70-01-01 08:01:43.000@ then +if $data00 != @70-01-01 08:01:40.000@ then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts desc limit 10 offset 8; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts desc limit 10 offset 8; if $row != 0 then return -1 endi -sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:43' and ts<='1970-1-1 8:1:43.00' order by ts desc limit 10 offset 9; +sql select ts,tbname from group_mt0 where ts>='1970-1-1 8:1:40' and ts<='1970-1-1 8:1:40.00' order by ts desc limit 10 offset 9; if $row != 0 then return -1 endi #[tbase-695] -sql select ts,tbname from group_mt0 where ts>='1970-01-01 8:1:40' and ts<'1970-1-1 8:1:45' and c1<99999999 limit 100000 offset 5000 +sql select ts,tbname from group_mt0 where ts>='1970-01-01 8:1:40' and ts<'1970-1-1 8:1:40.500' and c1<99999999 limit 10000 offset 500 print ===> $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print ===> $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 print ===> $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27 $data28 $data29 print ===> $data30 $data31 $data32 $data33 $data34 $data35 $data36 $data37 $data38 $data39 -if $row != 35000 then +if $row != 3500 then return -1 endi @@ -301,7 +301,7 @@ print tbase-722 sql select spread(ts) from group_tb0; print $data00 -if $data00 != 9999.000000000 then +if $data00 != 999.000000000 then return -1 endi diff --git a/tests/script/tsim/parser/selectResNum.sim b/tests/script/tsim/parser/selectResNum.sim index 43365b2af2c8fe52a3ce3e36d057ba9dcdc25a5d..11310782402b8e98fadcbaa9bf740c806c52443a 100644 --- a/tests/script/tsim/parser/selectResNum.sim +++ b/tests/script/tsim/parser/selectResNum.sim @@ -7,10 +7,10 @@ $dbPrefix = sc_db $tbPrefix = sc_tb $stbPrefix = sc_stb $tbNum = 10 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum $loops = 200000 -$log = 10000 +$log = 1000 $ts0 = 1537146000000 $delta = 600000 print ========== selectResNum.sim diff --git a/tests/script/tsim/parser/sliding.sim b/tests/script/tsim/parser/sliding.sim index 45a49fbc4e28662499ef71bcb1de9859e944b57d..1cb4cb5340f993ee25b4f73e8b076375ea28a445 100644 --- a/tests/script/tsim/parser/sliding.sim +++ b/tests/script/tsim/parser/sliding.sim @@ -7,7 +7,7 @@ $dbPrefix = sliding_db $tbPrefix = sliding_tb $mtPrefix = sliding_mt $tbNum = 8 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum print =============== sliding.sim @@ -88,25 +88,25 @@ $ts1 = $tb1 . .ts $ts2 = $tb2 . .ts print ===============================interval_sliding query -sql select _wstart, count(*) from sliding_tb0 interval(30s) sliding(30s); +sql select _wstart, count(*) from sliding_tb0 interval(3s) sliding(3s); if $row != 10 then return -1 endi if $data00 != @00-01-01 00:00:00.000@ then return -1 endi -if $data01 != 1000 then +if $data01 != 100 then return -1 endi -if $data10 != @00-01-01 00:00:30.000@ then +if $data10 != @00-01-01 00:00:03.000@ then return -1 endi -if $data11 != 1000 then +if $data11 != 100 then return -1 endi sql select _wstart, stddev(c1) from sliding_tb0 interval(10a) sliding(10a); -if $row != 10000 then +if $row != 1000 then return -1 endi if $data00 != @00-01-01 00:00:00.000@ then @@ -123,10 +123,10 @@ if $data91 != 0.000000000 then endi sql select _wstart, stddev(c1),count(c2),first(c3),last(c4) from sliding_tb0 interval(10a) sliding(10a) order by _wstart desc; -if $row != 10000 then +if $row != 1000 then return -1 endi -if $data00 != @00-01-01 00:04:59.970@ then +if $data00 != @00-01-01 00:00:29.970@ then return -1 endi if $data01 != 0.000000000 then @@ -141,7 +141,7 @@ endi if $data04 != 99 then return -1 endi -if $data90 != @00-01-01 00:04:59.700@ then +if $data90 != @00-01-01 00:00:29.700@ then return -1 endi if $data91 != 0.000000000 then @@ -157,41 +157,41 @@ if $data94 != 90 then return -1 endi -sql select _wstart, count(c2),last(c4) from sliding_tb0 interval(30s) sliding(10s) order by _wstart asc; +sql select _wstart, count(c2),last(c4) from sliding_tb0 interval(3s) sliding(1s) order by _wstart asc; if $row != 32 then return -1 endi -if $data00 != @99-12-31 23:59:40.000@ then - print expect 12-31 23:59:40.000, actual: $data00 +if $data00 != @99-12-31 23:59:58.000@ then + print expect 12-31 23:59:58.000, actual: $data00 return -1 endi -if $data01 != 334 then +if $data01 != 34 then return -1 endi if $data02 != 33 then return -1 endi -sql select _wstart, count(c2),stddev(c3),first(c4),last(c4) from sliding_tb0 where ts>'2000-01-01 0:0:0' and ts<'2000-1-1 0:0:31' interval(30s) sliding(30s) order by _wstart asc; +sql select _wstart, count(c2),stddev(c3),first(c4),last(c4) from sliding_tb0 where ts>'2000-01-01 0:0:0' and ts<'2000-1-1 0:0:4' interval(3s) sliding(3s) order by _wstart asc; if $row != 2 then return -1 endi if $data04 != 99 then return -1 endi -if $data01 != 999 then +if $data01 != 99 then return -1 endi -if $data02 != 28.837977152 then +if $data02 != 28.577380332 then return -1 endi #interval offset + limit -sql select _wstart, count(c2), first(c3),stddev(c4) from sliding_tb0 interval(10a) sliding(10a) order by _wstart desc limit 10 offset 990; +sql select _wstart, count(c2), first(c3),stddev(c4) from sliding_tb0 interval(10a) sliding(10a) order by _wstart desc limit 10 offset 90; if $row != 10 then return -1 endi -if $data00 != @00-01-01 00:04:30.270@ then +if $data00 != @00-01-01 00:00:27.270@ then return -1 endi if $data01 != 1 then @@ -203,7 +203,7 @@ endi if $data03 != 0.000000000 then return -1 endi -if $data90 != @00-01-01 00:04:30.000@ then +if $data90 != @00-01-01 00:00:27.000@ then return -1 endi if $data91 != 1 then @@ -217,43 +217,43 @@ if $data93 != 0.000000000 then endi #interval offset test -sql select _wstart, count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(30s) order by _wstart asc limit 1000 offset 1; +sql select _wstart, count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(3s) order by _wstart asc limit 100 offset 1; if $row != 9 then return -1 endi -if $data00 != @00-01-01 00:00:30.000@ then +if $data00 != @00-01-01 00:00:03.000@ then return -1 endi -if $data01 != 1000 then +if $data01 != 100 then return -1 endi if $data02 != 99 then return -1 endi -if $data80 != @00-01-01 00:04:30.000@ then +if $data80 != @00-01-01 00:00:27.000@ then return -1 endi -if $data81 != 1000 then +if $data81 != 100 then return -1 endi -sql select _wstart, count(c2),last(c4),stddev(c3) from sliding_tb0 where ts>'2000-1-1 0:0:0' and ts<'2000-1-1 0:0:31' interval(30s) sliding(30s) order by _wstart asc limit 1000 offset 0; +sql select _wstart, count(c2),last(c4),stddev(c3) from sliding_tb0 where ts>'2000-1-1 0:0:0' and ts<'2000-1-1 0:0:4' interval(3s) sliding(3s) order by _wstart asc limit 100 offset 0; if $row != 2 then return -1 endi if $data00 != @00-01-01 00:00:00.000@ then return -1 endi -if $data01 != 999 then +if $data01 != 99 then return -1 endi if $data02 != 99 then return -1 endi -if $data03 != 28.837977152 then +if $data03 != 28.577380332 then return -1 endi -if $data10 != @00-01-01 00:00:30.000@ then +if $data10 != @00-01-01 00:00:03.000@ then return -1 endi if $data11 != 34 then @@ -266,14 +266,14 @@ if $data13 != 9.810708435 then return -1 endi -sql select _wstart, count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 1; +sql select _wstart, count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 1; if $row != 15 then return -1 endi if $data00 != @00-01-01 00:00:00.000@ then return -1 endi -if $data01 != 1000 then +if $data01 != 100 then return -1 endi if $data02 != 99 then @@ -282,85 +282,85 @@ endi if $data03 != 28.866070048 then return -1 endi -if $data90 != @00-01-01 00:03:00.000@ then +if $data90 != @00-01-01 00:00:18.000@ then return -1 endi -if $data91 != 1000 then +if $data91 != 100 then return -1 endi if $data92 != 99 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 5; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 5; if $row != 11 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 6; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 6; if $row != 10 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 7; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 7; if $row != 9 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 8; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 8; if $row != 8 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 9; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 9; if $row != 7 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 10; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 10; if $row != 6 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 11; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 11; if $row != 5 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 12; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 12; if $row != 4 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 13; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 13; if $row != 3 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 14; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 14; if $row != 2 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 15; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 15; if $row != 1 then return -1 endi -sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(30s) sliding(20s) order by _wstart asc limit 100 offset 16; +sql select count(c2),last(c4),stddev(c3) from sliding_tb0 interval(3s) sliding(2s) order by _wstart asc limit 100 offset 16; if $row != 0 then return -1 endi -sql select _wstart, count(c2),last(c4),stddev(c3),spread(c3) from sliding_tb0 where c2 = 0 interval(30s) order by _wstart desc; +sql select _wstart, count(c2),last(c4),stddev(c3),spread(c3) from sliding_tb0 where c2 = 0 interval(3s) order by _wstart desc; if $row != 10 then return -1 endi -#00-01-01 00:04:30.000| 10| 0| 0.000000000| 0.000000000| -if $data00 != @00-01-01 00:04:30.000@ then +#00-01-01 00:00:27.000 | 1 | 0 | 0.000000000 | 0.000000000 | +if $data00 != @00-01-01 00:00:27.000@ then return -1 endi -if $data01 != 10 then +if $data01 != 1 then return -1 endi if $data02 != 0 then @@ -370,18 +370,18 @@ if $data03 != 0.000000000 then return -1 endi -sql select count(c2),last(c4),stddev(c3),spread(c3) from sliding_tb0 where c2 = 0 interval(30s) sliding(20s) order by _wstart desc limit 1 offset 15; +sql select count(c2),last(c4),stddev(c3),spread(c3) from sliding_tb0 where c2 = 0 interval(3s) sliding(2s) order by _wstart desc limit 1 offset 14; if $row != 1 then return -1 endi -sql select count(c2),last(c4),stddev(c3),spread(c3) from sliding_tb0 where c2 = 0 interval(30s) sliding(20s) order by _wstart desc limit 1 offset 16; +sql select count(c2),last(c4),stddev(c3),spread(c3) from sliding_tb0 where c2 = 0 interval(3s) sliding(2s) order by _wstart desc limit 1 offset 15; if $row != 0 then return -1 endi sql select _wstart, count(c2), first(c3),stddev(c4) from sliding_tb0 interval(10a) order by _wstart desc limit 10 offset 2; -if $data00 != @00-01-01 00:04:59.910@ then +if $data00 != @00-01-01 00:00:29.910@ then return -1 endi diff --git a/tests/script/tsim/parser/union.sim b/tests/script/tsim/parser/union.sim index 9e7c6f77cc90f9612e9d258880322c218892c828..dee5da96e8488a14cc615d7ab3944ccf6558f93e 100644 --- a/tests/script/tsim/parser/union.sim +++ b/tests/script/tsim/parser/union.sim @@ -8,7 +8,7 @@ $tbPrefix = union_tb $tbPrefix1 = union_tb_ $mtPrefix = union_mt $tbNum = 10 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum print =============== union.sim @@ -65,7 +65,7 @@ sql create table $mt1 (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c $j = 0 $t = 1578203484000 -$rowNum = 1000 +$rowNum = 100 $tbNum = 5 $i = 0 @@ -117,7 +117,7 @@ sql_error (select c1 from union_tb0 limit 1 union all select c1 from union_tb1 l # sql with parenthese sql (select c1 from union_tb0) -if $rows != 10000 then +if $rows != 1000 then return -1 endi if $data00 != 0 then @@ -187,7 +187,7 @@ endi if $data10 != 1 then return -1 endi -if $data20 != 4950000 then +if $data20 != 495000 then return -1 endi @@ -202,7 +202,7 @@ endi if $data10 != 1 then return -1 endi -if $data20 != 495000 then +if $data20 != 49500 then return -1 endi @@ -211,7 +211,7 @@ sql (select count(*) as c from union_tb0, union_tb1 where union_tb0.ts=union_tb1 if $rows != 11 then return -1 endi -if $data00 != 10000 then +if $data00 != 1000 then return -1 endi if $data10 != 9 then @@ -227,7 +227,7 @@ endi print ===========================================tags union # two super table tag union, limit is not active during retrieve tags query sql (select t1 from union_mt0) union all (select t1 from union_mt0) -if $rows != 200000 then +if $rows != 20000 then return -1 endi @@ -248,7 +248,7 @@ sql (select count(*) as c from union_tb0 where ts > now + 3650d) union all (sele if $rows != 2 then return -1 endi -#if $data00 != 495000 then +#if $data00 != 49500 then # return -1 #endi @@ -272,7 +272,7 @@ endi # multi-vnode projection query sql (select c1 from union_mt0) union all select c1 from union_mt0; -if $rows != 200000 then +if $rows != 20000 then return -1 endi @@ -330,10 +330,10 @@ sql (select sum(c1) as a from union_tb0 limit 1) union all (select sum(c3) as a if $rows != 2 then return -1 endi -if $data00 != 495000 then +if $data00 != 49500 then return -1 endi -if $data10 != 495000 then +if $data10 != 49500 then return -1 endi diff --git a/tests/script/tsim/parser/where.sim b/tests/script/tsim/parser/where.sim index c1660883b6189a74c38b59b95c4c4fc1fcad8a90..8ab47dacafe9ae39f49db82d045574b2a3448884 100644 --- a/tests/script/tsim/parser/where.sim +++ b/tests/script/tsim/parser/where.sim @@ -7,7 +7,7 @@ $dbPrefix = wh_db $tbPrefix = wh_tb $mtPrefix = wh_mt $tbNum = 10 -$rowNum = 10000 +$rowNum = 1000 $totalNum = $tbNum * $rowNum print =============== where.sim @@ -62,7 +62,7 @@ sql select count(*) from $tb where c1<10 and c1<>2 if $rows != 1 then return -1 endi -if $data00 != 900 then +if $data00 != 90 then return -1 endi @@ -308,9 +308,9 @@ if $row != 0 then endi sql select * from wh_mt0 where c3 = 1; -print $rows -> 1000 +print $rows -> 100 print $data00 $data01 $data02 -if $row != 1000 then +if $row != 100 then return -1 endi diff --git a/tests/script/tsim/valgrind/checkError7.sim b/tests/script/tsim/valgrind/checkError7.sim index af42d1e76b50bc07e9c7a484bd24c9544517f980..edfe8816c9d0e83f705032c64da2dd5ccd7034f2 100644 --- a/tests/script/tsim/valgrind/checkError7.sim +++ b/tests/script/tsim/valgrind/checkError7.sim @@ -8,8 +8,9 @@ sql create database d1 sql use d1 $x = 0 -while $x < 128 +while $x < 5 $tb = d1.s . $x + print create table $tb (ts timestamp, i int) tags (j int) sql create table $tb (ts timestamp, i int) tags (j int) $x = $x + 1 endw @@ -17,7 +18,7 @@ endw print ======================== describe stables # TODO : create stable error $m = 0 -while $m < 128 +while $m < 5 $tb = s . $m $filter = ' . $tb $filter = $filter . ' @@ -36,15 +37,16 @@ print ======================== show stables sql show d1.stables print num of stables is $rows -if $rows != 128 then +if $rows != 5 then return -1 endi print ======================== create table $x = 0 -while $x < 424 +while $x < 42 $tb = d1.t . $x + print create table $tb using d1.s0 tags( $x ) sql create table $tb using d1.s0 tags( $x ) $x = $x + 1 endw @@ -54,7 +56,7 @@ print ======================== show stables sql show d1.tables print num of tables is $rows -if $rows != 424 then +if $rows != 42 then return -1 endi