[td-1752] add test cases.

This commit is contained in:
Haojun Liao 2020-10-21 10:07:35 +08:00
parent 9f653edacd
commit 015f1b82c5
2 changed files with 20 additions and 2 deletions

View File

@ -91,4 +91,22 @@ endi
sql_error select max(c2*2) from $tb
sql_error select max(c1-c2) from $tb
print =====================> td-1764
sql select sum(c1)/count(*), sum(c1) as b, count(*) as b from $stb interval(1y)
if $rows != 1 then
return -1
endi
if $data00 != @18-01-01 00:00:00.000@ then
return -1
endi
if $data01 != 2.250000000 then
return -1
endi
if $data02 != 225000 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT

View File

@ -251,7 +251,7 @@ if $rows != 15 then
endi
# first subclause are empty
sql select count(*) as c from union_tb0 where ts>now+10y union all select sum(c1) as c from union_tb1;
sql select count(*) as c from union_tb0 where ts > now + 3650d union all select sum(c1) as c from union_tb1;
if $rows != 1 then
return -1
endi
@ -346,7 +346,7 @@ if $data91 != 99 then
return -1
endi
#1111111111111111111111111111111111111111111111111
#=================================================================================================
# two aggregated functions for normal tables
sql select sum(c1) as a from union_tb0 limit 1 union all select sum(c3) as a from union_tb1 limit 2;
if $rows != 2 then