[TD-225]update the sim.

This commit is contained in:
Haojun Liao 2021-01-12 12:07:57 +08:00
parent cba224d4a0
commit beeab48cc9
2 changed files with 68 additions and 2 deletions

View File

@ -107,3 +107,69 @@ if $data01 != 1 then
endi
sql select a+b+c from mt_unsigned_1 where a is null;
if $rows != 1 then
return -1
endi
if $data00 != 6.000000000 then
return -1
endi
sql select count(*), a from mt_unsigned_1 group by a;
if $rows != 1 then
return -1
endi
if $data00 != 1 then
return -1
endi
if $data01 != 1 then
return -1
endi
sql select count(*), b from mt_unsigned_1 group by b;
if $rows != 1 then
return -1
endi
if $data00 != 1 then
return -1
endi
if $data01 != 2 then
return -1
endi
sql select count(*), c from mt_unsigned_1 group by c;
if $rows != 1 then
return -1
endi
if $data00 != 1 then
return -1
endi
if $data01 != 3 then
return -1
endi
sql select count(*), d from mt_unsigned_1 group by d;
if $rows != 1 then
return -1
endi
if $data00 != 1 then
return -1
endi
if $data01 != 4 then
return -1
endi
// todo insert more rows and chec it
sql select first(a),count(b),last(c),sum(b),spread(d),avg(c),min(b),max(a),stddev(a) from mt_unsigned_1;
if $rows != 1 then
return -1
endi

View File

@ -227,7 +227,7 @@ sql select twa(k),avg(k),count(1) from t1 where ts>='2015-8-18 00:00:00' and ts<
sql select twa(k),avg(k),count(1) from t1 where ts>='2015-8-18 00:00:00' and ts<='2015-8-18 00:30:00' interval(10m) order by ts desc
#todo add test case while column filter exists.
#todo add test case while column filter exists for twa query
#sql select count(*),TWA(k) from tm0 where ts>='1970-1-1 13:43:00' and ts<='1970-1-1 13:44:10' interval(9s)