提交 0ba9d225 编写于 作者: S Shengliang Guan

test: restore some 2.0 case

上级 2ea11ba9
run general/compute/avg.sim
run general/compute/bottom.sim
run general/compute/count.sim
run general/compute/diff.sim
run general/compute/diff2.sim
run general/compute/first.sim
run general/compute/interval.sim
run general/compute/last.sim
run general/compute/leastsquare.sim
run general/compute/max.sim
run general/compute/min.sim
run general/compute/null.sim
run general/compute/percentile.sim
run general/compute/stddev.sim
run general/compute/sum.sim
run general/compute/top.sim
run general/compute/block_dist.sim
......@@ -225,6 +225,26 @@
./test.sh -f tsim/compress/compress.sim
./test.sh -f tsim/compress/uncompress.sim
# ---- compute
#./test.sh -f tsim/compute/avg.sim
#./test.sh -f tsim/compute/block_dist.sim
#./test.sh -f tsim/compute/bottom.sim
#./test.sh -f tsim/compute/count.sim
#./test.sh -f tsim/compute/diff.sim
#./test.sh -f tsim/compute/diff2.sim
#./test.sh -f tsim/compute/first.sim
#./test.sh -f tsim/compute/interval.sim
#./test.sh -f tsim/compute/last_row.sim
#./test.sh -f tsim/compute/last.sim
#./test.sh -f tsim/compute/leastsquare.sim
#./test.sh -f tsim/compute/max.sim
#./test.sh -f tsim/compute/min.sim
#./test.sh -f tsim/compute/null.sim
./test.sh -f tsim/compute/percentile.sim
./test.sh -f tsim/compute/stddev.sim
./test.sh -f tsim/compute/sum.sim
./test.sh -f tsim/compute/top.sim
# ---- field
./test.sh -f tsim/field/2.sim
./test.sh -f tsim/field/3.sim
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_av_db
......@@ -163,7 +160,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_di_db
......@@ -91,7 +88,7 @@ sql_error select _block_dist() from (select * from $mt)
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_bo_db
......@@ -98,7 +95,7 @@ step6:
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_co_db
......@@ -192,7 +189,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_di_db
......@@ -91,7 +88,7 @@ step6:
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_di_db
......@@ -152,7 +149,7 @@ step6:
print =============== clear
#sql drop database $db
#sql show databases
#if $rows != 0 then
#if $rows != 2 then
# return -1
#endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_fi_db
......@@ -165,7 +162,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_in_db
......@@ -199,7 +196,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_la_db
......@@ -169,7 +166,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_la_db
......@@ -217,7 +214,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_le_db
......@@ -93,7 +90,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_ma_db
......@@ -169,7 +166,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_mi_db
......@@ -73,14 +69,14 @@ endi
print =============== step5
sql select min(tbcol) as b from $tb interval(1m)
print ===> $data11
if $data11 != 1 then
print ===> $data10
if $data10 != 1 then
return -1
endi
sql select min(tbcol) as b from $tb interval(1d)
print ===> $data01
if $data01 != 0 then
print ===> $data00
if $data00 != 0 then
return -1
endi
......@@ -90,8 +86,8 @@ $ms = 1601481600000 + $cc
sql select min(tbcol) as b from $tb where ts <= $ms interval(1m)
print select min(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data11
if $data11 != 1 then
print ===> $data10
if $data10 != 1 then
return -1
endi
if $rows != 5 then
......@@ -130,14 +126,14 @@ endi
print =============== step9
sql select min(tbcol) as b from $mt interval(1m)
print ===> $data11
if $data11 != 1 then
print ===> $data10
if $data10 != 1 then
return -1
endi
sql select min(tbcol) as b from $mt interval(1d)
print ===> $data01
if $data01 != 0 then
print ===> $data00
if $data00 != 0 then
return -1
endi
......@@ -155,9 +151,9 @@ endi
print =============== step11
$cc = 4 * 60000
$ms = 1601481600000 + $cc
sql select min(tbcol) as b from $mt where ts <= $ms interval(1m) group by tgcol
print ===> $data11
if $data11 != 1 then
sql select min(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
print ===> $data10
if $data10 != 1 then
return -1
endi
print ===> $rows
......@@ -168,7 +164,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = db
......@@ -98,22 +95,26 @@ if $data02 != 19 then
return -1
endi
sql select * from $tb where tbcol = NULL -x step3
sql select * from $tb where tbcol is NULL
if $rows != 1 then
return -1
step3:
endi
sql_error select * from $tb where tbcol = NULL
return
print =============== step5
sql create table $tb using $mt tags( NULL )
# return -1
#step51:
sql create table tt using $mt tags( NULL )
#sql alter table $tb set tgcol=NULL -x step52
# return -1
#step52:
sql select * from $mt where tgcol = NULL -x step5
sql select * from $mt where tgcol is NULL
if $rows != 1 then
return -1
step5:
endi
print =============== step6
sql select count(tbcol), count(tbcol2), avg(tbcol), avg(tbcol2), sum(tbcol), sum(tbcol2) from $mt
......@@ -222,7 +223,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_pe_db
......@@ -125,11 +122,10 @@ if $data00 != 5.000000000 then
return -1
endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_st_db
......@@ -72,14 +69,14 @@ endi
print =============== step5
sql select stddev(tbcol) as b from $tb interval(1m)
print ===> $data01
if $data01 != 0.000000000 then
print ===> $data00
if $data00 != 0.000000000 then
return -1
endi
sql select stddev(tbcol) as b from $tb interval(1d)
print ===> $data01
if $data01 != 5.766281297 then
print ===> $data00
if $data00 != 5.766281297 then
return -1
endi
......@@ -88,8 +85,8 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
sql select stddev(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data01
if $data01 != 0.000000000 then
print ===> $data00
if $data00 != 0.000000000 then
return -1
endi
if $rows != 5 then
......@@ -99,7 +96,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_su_db
......@@ -72,14 +69,14 @@ endi
print =============== step5
sql select sum(tbcol) as b from $tb interval(1m)
print ===> $data11
if $data11 != 1 then
print ===> $data10
if $data10 != 1 then
return -1
endi
sql select sum(tbcol) as b from $tb interval(1d)
print ===> $data01
if $data01 != 190 then
print ===> $data00
if $data00 != 190 then
return -1
endi
......@@ -88,8 +85,8 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
sql select sum(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data11
if $data11 != 1 then
print ===> $data10
if $data10 != 1 then
return -1
endi
if $rows != 5 then
......@@ -130,14 +127,14 @@ endi
print =============== step9
sql select sum(tbcol) as b from $mt interval(1m)
print ===> $data11
if $data11 < 5 then
print ===> $data10
if $data10 < 5 then
return -1
endi
sql select sum(tbcol) as b from $mt interval(1d)
print ===> $data01
if $data01 != 1900 then
print ===> $data00
if $data00 != 1900 then
return -1
endi
......@@ -156,10 +153,10 @@ print =============== step11
$cc = 4 * 60000
$ms = 1601481600000 + $cc
sql select sum(tbcol) as b from $mt where ts <= $ms interval(1d) group by tgcol
print select sum(tbcol) as b from $mt where ts <= $ms interval(1d) group by tgcol
print ===> $data01
if $data01 != 10 then
sql select sum(tbcol) as b from $mt where ts <= $ms group by tgcol
print select sum(tbcol) as b from $mt where ts <= $ms group by tgcol
print ===> $data00
if $data00 != 10 then
return -1
endi
if $rows != 10 then
......@@ -169,7 +166,7 @@ endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
$dbPrefix = m_to_db
......@@ -48,8 +45,8 @@ $i = 1
$tb = $tbPrefix . $i
sql select top(tbcol, 1) from $tb
print ===> $data01
if $data01 != 19 then
print ===> $data00
if $data00 != 19 then
return -1
endi
......@@ -58,25 +55,25 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
sql select top(tbcol, 1) from $tb where ts <= $ms
print ===> $data01
if $data01 != 4 then
print ===> $data00
if $data00 != 4 then
return -1
endi
print =============== step4
sql select top(tbcol, 1) as b from $tb
print ===> $data01
if $data01 != 19 then
print ===> $data00
if $data00 != 19 then
return -1
endi
print =============== step5
sql select top(tbcol, 2) as b from $tb
print ===> $data01 $data11
if $data01 != 18 then
print ===> $data00 $data10
if $data00 != 18 then
return -1
endi
if $data11 != 19 then
if $data10 != 19 then
return -1
endi
......@@ -85,11 +82,11 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
sql select top(tbcol, 2) as b from $tb where ts <= $ms
print ===> $data01 $data11
if $data01 != 3 then
print ===> $data00 $data10
if $data00 != 3 then
return -1
endi
if $data11 != 4 then
if $data10 != 4 then
return -1
endi
......@@ -100,7 +97,7 @@ step6:
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册