From 71fe2885d4044f93a05ed9ad172a11063ab6575b Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 19 Nov 2020 14:46:46 +0800 Subject: [PATCH] [TD-225]update sim. --- tests/script/general/parser/groupby.sim | 11 +- tests/script/general/parser/interp.sim | 3 +- tests/script/general/parser/tbnameIn.sim | 3 +- tests/script/general/parser/testSuite.sim | 128 +++++++++++----------- tests/script/general/parser/union.sim | 11 +- tests/script/general/parser/where.sim | 11 +- 6 files changed, 93 insertions(+), 74 deletions(-) diff --git a/tests/script/general/parser/groupby.sim b/tests/script/general/parser/groupby.sim index c0a6709fe4..7f02fe6fa5 100644 --- a/tests/script/general/parser/groupby.sim +++ b/tests/script/general/parser/groupby.sim @@ -33,12 +33,19 @@ sql create database if not exists $db keep 36500 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, t2 binary(12)) +$half = $tbNum / 2 + $i = 0 -while $i < $tbNum +while $i < $half $tb = $tbPrefix . $i $tg2 = ' . abc $tg2 = $tg2 . ' + + $nextSuffix = $i + $half + $tb1 = $tbPrefix . $nextSuffix + sql create table $tb using $mt tags( $i , $tg2 ) + sql create table $tb1 using $mt tags( $nextSuffix , $tg2 ) $x = 0 while $x < $rowNum @@ -55,7 +62,7 @@ while $i < $tbNum $nchar = $nchar . $c $nchar = $nchar . ' - sql insert into $tb values ($tstart , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) + sql insert into $tb values ($tstart , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) $tb1 values ($tstart , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) $tstart = $tstart + 1 $x = $x + 1 endw diff --git a/tests/script/general/parser/interp.sim b/tests/script/general/parser/interp.sim index 8777c3ed9b..0d5c1804dd 100644 --- a/tests/script/general/parser/interp.sim +++ b/tests/script/general/parser/interp.sim @@ -47,8 +47,7 @@ while $i < $halfNum $binary = $binary . ' $nchar = 'nchar . $c $nchar = $nchar . ' - sql insert into $tb values ( $ts , $c , $c , $c , $c , $c , $c , true, $binary , $nchar ) - sql insert into $tb1 values ( $ts , $c , NULL , $c , NULL , $c , $c , true, $binary , $nchar ) + sql insert into $tb values ( $ts , $c , $c , $c , $c , $c , $c , true, $binary , $nchar ) $tb1 values ( $ts , $c , NULL , $c , NULL , $c , $c , true, $binary , $nchar ) $x = $x + 1 endw diff --git a/tests/script/general/parser/tbnameIn.sim b/tests/script/general/parser/tbnameIn.sim index 87c4871792..d0f74ae53d 100644 --- a/tests/script/general/parser/tbnameIn.sim +++ b/tests/script/general/parser/tbnameIn.sim @@ -55,8 +55,7 @@ while $i < $halfNum $binary = $binary . ' $nchar = 'nchar . $c $nchar = $nchar . ' - sql insert into $tb values ( $ts , $c , $c , $c , $c , $c , $c , true, $binary , $nchar ) - sql insert into $tb1 values ( $ts , $c , NULL , $c , NULL , $c , $c , true, $binary , $nchar ) + sql insert into $tb values ( $ts , $c , $c , $c , $c , $c , $c , true, $binary , $nchar ) $tb1 values ( $ts , $c , NULL , $c , NULL , $c , $c , true, $binary , $nchar ) $x = $x + 1 endw diff --git a/tests/script/general/parser/testSuite.sim b/tests/script/general/parser/testSuite.sim index 0e12379659..7c9dd2b6b5 100644 --- a/tests/script/general/parser/testSuite.sim +++ b/tests/script/general/parser/testSuite.sim @@ -1,67 +1,67 @@ -#sleep 500 -#run general/parser/alter.sim -#sleep 500 -#run general/parser/alter1.sim -#sleep 500 -#run general/parser/alter_stable.sim -#sleep 500 -#run general/parser/auto_create_tb.sim -#sleep 500 -#run general/parser/auto_create_tb_drop_tb.sim -#sleep 500 -#run general/parser/col_arithmetic_operation.sim -#sleep 500 -#run general/parser/columnValue.sim -#sleep 500 -#run general/parser/commit.sim -#sleep 500 -#run general/parser/create_db.sim -#sleep 500 -#run general/parser/create_mt.sim -#sleep 500 -#run general/parser/create_tb.sim -#sleep 500 -#run general/parser/dbtbnameValidate.sim -#sleep 500 -#run general/parser/fill.sim -#sleep 500 -#run general/parser/fill_stb.sim -#sleep 500 -##run general/parser/fill_us.sim # -#sleep 500 -#run general/parser/first_last.sim -#sleep 500 -#run general/parser/import_commit1.sim -#sleep 500 -#run general/parser/import_commit2.sim -#sleep 500 -#run general/parser/import_commit3.sim -#sleep 500 -##run general/parser/import_file.sim -#sleep 500 -#run general/parser/insert_tb.sim -#sleep 500 -#run general/parser/tags_dynamically_specifiy.sim -#sleep 500 -#run general/parser/interp.sim -#sleep 500 -#run general/parser/lastrow.sim -#sleep 500 -#run general/parser/limit.sim -#sleep 500 -#run general/parser/limit1.sim -#sleep 500 -#run general/parser/limit1_tblocks100.sim -#sleep 500 -#run general/parser/limit2.sim -#sleep 500 -#run general/parser/mixed_blocks.sim -#sleep 500 -#run general/parser/nchar.sim -#sleep 500 -#run general/parser/null_char.sim -#sleep 500 -#run general/parser/selectResNum.sim +sleep 500 +run general/parser/alter.sim +sleep 500 +run general/parser/alter1.sim +sleep 500 +run general/parser/alter_stable.sim +sleep 500 +run general/parser/auto_create_tb.sim +sleep 500 +run general/parser/auto_create_tb_drop_tb.sim +sleep 500 +run general/parser/col_arithmetic_operation.sim +sleep 500 +run general/parser/columnValue.sim +sleep 500 +run general/parser/commit.sim +sleep 500 +run general/parser/create_db.sim +sleep 500 +run general/parser/create_mt.sim +sleep 500 +run general/parser/create_tb.sim +sleep 500 +run general/parser/dbtbnameValidate.sim +sleep 500 +run general/parser/fill.sim +sleep 500 +run general/parser/fill_stb.sim +sleep 500 +#run general/parser/fill_us.sim # +sleep 500 +run general/parser/first_last.sim +sleep 500 +run general/parser/import_commit1.sim +sleep 500 +run general/parser/import_commit2.sim +sleep 500 +run general/parser/import_commit3.sim +sleep 500 +#run general/parser/import_file.sim +sleep 500 +run general/parser/insert_tb.sim +sleep 500 +run general/parser/tags_dynamically_specifiy.sim +sleep 500 +run general/parser/interp.sim +sleep 500 +run general/parser/lastrow.sim +sleep 500 +run general/parser/limit.sim +sleep 500 +run general/parser/limit1.sim +sleep 500 +run general/parser/limit1_tblocks100.sim +sleep 500 +run general/parser/limit2.sim +sleep 500 +run general/parser/mixed_blocks.sim +sleep 500 +run general/parser/nchar.sim +sleep 500 +run general/parser/null_char.sim +sleep 500 +run general/parser/selectResNum.sim sleep 500 run general/parser/select_across_vnodes.sim sleep 500 diff --git a/tests/script/general/parser/union.sim b/tests/script/general/parser/union.sim index d779d75731..cb46ac6b0d 100644 --- a/tests/script/general/parser/union.sim +++ b/tests/script/general/parser/union.sim @@ -36,9 +36,16 @@ sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 $i = 0 $t = 1578203484000 -while $i < $tbNum +$half = $tbNum / 2 + +while $i < $half $tb = $tbPrefix . $i + + $nextSuffix = $i + $half + $tb1 = $tbPrefix . $nextSuffix + sql create table $tb using $mt tags( $i ) + sql create table $tb1 using $mt tags( $nextSuffix ) $x = 0 while $x < $rowNum @@ -54,7 +61,7 @@ while $i < $tbNum $nchar = $nchar . ' $t1 = $t + $ms - sql insert into $tb values ($t1 , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) + sql insert into $tb values ($t1 , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) $tb1 values ($t1 , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) $x = $x + 1 endw diff --git a/tests/script/general/parser/where.sim b/tests/script/general/parser/where.sim index 4a38e3c68c..8e17220b5b 100644 --- a/tests/script/general/parser/where.sim +++ b/tests/script/general/parser/where.sim @@ -26,10 +26,17 @@ 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 + $i = 0 -while $i < $tbNum +while $i < $half $tb = $tbPrefix . $i + + $nextSuffix = $i + $half + $tb1 = $tbPrefix . $nextSuffix + sql create table $tb using $mt tags( $i ) + sql create table $tb1 using $mt tags( $nextSuffix ) $x = 0 while $x < $rowNum @@ -42,7 +49,7 @@ while $i < $tbNum $binary = $binary . ' $nchar = 'nchar . $c $nchar = $nchar . ' - sql insert into $tb values ($ms , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) + sql insert into $tb values ($ms , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) $tb1 values ($ms , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) $x = $x + 1 endw -- GitLab