Merge pull request #11449 from taosdata/cpwu/3.0
test: fix group by sim case
This commit is contained in:
commit
0c679ac947
|
@ -97,167 +97,167 @@ print ================ query 1 group by filter
|
|||
sql select count(*) from ct3 group by c1
|
||||
print ====> sql : select count(*) from ct3 group by c1
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c2
|
||||
print ====> sql : select count(*) from ct3 group by c2
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c3
|
||||
print ====> sql : select count(*) from ct3 group by c3
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c4
|
||||
print ====> sql : select count(*) from ct3 group by c4
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c5
|
||||
print ====> sql : select count(*) from ct3 group by c5
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c6
|
||||
print ====> sql : select count(*) from ct3 group by c6
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c7
|
||||
print ====> sql : select count(*) from ct3 group by c7
|
||||
print ====> rows: $rows
|
||||
if $rows != 2 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c8
|
||||
print ====> sql : select count(*) from ct3 group by c8
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c9
|
||||
print ====> sql : select count(*) from ct3 group by c9
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c10
|
||||
print ====> sql : select count(*) from ct3 group by c10
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print ================ query 2 complex with group by
|
||||
sql select count(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select count(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
print ====> sql : select count(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select abs(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select abs(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select abs(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select abs(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select acos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select acos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select acos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select acos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select asin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select asin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select asin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select asin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select atan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select atan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select atan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select atan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select ceil(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select ceil(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select ceil(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select ceil(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select cos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select cos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select cos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select cos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select floor(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select floor(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select floor(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select floor(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select log(c1,10) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select log(c1,10) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select log(c1,10) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select log(c1,10) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select pow(c1,3) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select pow(c1,3) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select pow(c1,3) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select pow(c1,3) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select round(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select round(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select round(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select round(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select sqrt(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select sqrt(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select sqrt(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select sqrt(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select sin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select sin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select sin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select sin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select tan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select tan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select tan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select tan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
|
@ -307,170 +307,170 @@ print ================ query 1 group by filter
|
|||
sql select count(*) from ct3 group by c1
|
||||
print ====> sql : select count(*) from ct3 group by c1
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c2
|
||||
print ====> sql : select count(*) from ct3 group by c2
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c3
|
||||
print ====> sql : select count(*) from ct3 group by c3
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c4
|
||||
print ====> sql : select count(*) from ct3 group by c4
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c5
|
||||
print ====> sql : select count(*) from ct3 group by c5
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c6
|
||||
print ====> sql : select count(*) from ct3 group by c6
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c7
|
||||
print ====> sql : select count(*) from ct3 group by c7
|
||||
print ====> rows: $rows
|
||||
if $rows != 2 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c8
|
||||
print ====> sql : select count(*) from ct3 group by c8
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c9
|
||||
print ====> sql : select count(*) from ct3 group by c9
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(*) from ct3 group by c10
|
||||
print ====> sql : select count(*) from ct3 group by c10
|
||||
print ====> rows: $rows
|
||||
if $rows != 8 then
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print ================ query 2 complex with group by
|
||||
sql select count(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select count(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
print ====> sql : select count(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select abs(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select abs(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select abs(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select abs(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select acos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select acos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select acos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select acos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select asin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select asin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select asin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select asin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select atan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select atan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select atan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select atan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select ceil(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select ceil(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select ceil(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select ceil(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select cos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select cos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select cos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select cos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select floor(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select floor(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select floor(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select floor(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select log(c1,10) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select log(c1,10) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select log(c1,10) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select log(c1,10) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select pow(c1,3) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select pow(c1,3) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select pow(c1,3) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select pow(c1,3) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select round(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select round(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select round(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select round(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select sqrt(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select sqrt(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select sqrt(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select sqrt(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select sin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select sin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select sin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select sin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select tan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1
|
||||
print ====> sql : select tan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 2
|
||||
sql select tan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 1
|
||||
print ====> sql : select tan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
|
||||
print ====> rows: $rows
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
Loading…
Reference in New Issue