Merge pull request #11449 from taosdata/cpwu/3.0

test: fix group by sim case
This commit is contained in:
cpwu 2022-04-13 14:22:43 +08:00 committed by GitHub
commit 0c679ac947
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 75 additions and 75 deletions

View File

@ -97,167 +97,167 @@ print ================ query 1 group by filter
sql select count(*) from ct3 group by c1 sql select count(*) from ct3 group by c1
print ====> sql : select count(*) from ct3 group by c1 print ====> sql : select count(*) from ct3 group by c1
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c2 sql select count(*) from ct3 group by c2
print ====> sql : select count(*) from ct3 group by c2 print ====> sql : select count(*) from ct3 group by c2
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c3 sql select count(*) from ct3 group by c3
print ====> sql : select count(*) from ct3 group by c3 print ====> sql : select count(*) from ct3 group by c3
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c4 sql select count(*) from ct3 group by c4
print ====> sql : select count(*) from ct3 group by c4 print ====> sql : select count(*) from ct3 group by c4
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c5 sql select count(*) from ct3 group by c5
print ====> sql : select count(*) from ct3 group by c5 print ====> sql : select count(*) from ct3 group by c5
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c6 sql select count(*) from ct3 group by c6
print ====> sql : select count(*) from ct3 group by c6 print ====> sql : select count(*) from ct3 group by c6
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c7 sql select count(*) from ct3 group by c7
print ====> sql : select count(*) from ct3 group by c7 print ====> sql : select count(*) from ct3 group by c7
print ====> rows: $rows print ====> rows: $rows
if $rows != 2 then if $rows != 3 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c8 sql select count(*) from ct3 group by c8
print ====> sql : select count(*) from ct3 group by c8 print ====> sql : select count(*) from ct3 group by c8
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c9 sql select count(*) from ct3 group by c9
print ====> sql : select count(*) from ct3 group by c9 print ====> sql : select count(*) from ct3 group by c9
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c10 sql select count(*) from ct3 group by c10
print ====> sql : select count(*) from ct3 group by c10 print ====> sql : select count(*) from ct3 group by c10
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
print ================ query 2 complex with group by print ================ query 2 complex with group by
sql select count(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select abs(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select abs(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select acos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select acos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select asin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select asin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select atan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select atan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select ceil(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select ceil(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select cos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select cos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select floor(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select floor(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select log(c1,10) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select log(c1,10) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select pow(c1,3) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select pow(c1,3) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select round(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select round(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select sqrt(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select sqrt(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select sin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select sin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select tan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select tan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
@ -307,170 +307,170 @@ print ================ query 1 group by filter
sql select count(*) from ct3 group by c1 sql select count(*) from ct3 group by c1
print ====> sql : select count(*) from ct3 group by c1 print ====> sql : select count(*) from ct3 group by c1
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c2 sql select count(*) from ct3 group by c2
print ====> sql : select count(*) from ct3 group by c2 print ====> sql : select count(*) from ct3 group by c2
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c3 sql select count(*) from ct3 group by c3
print ====> sql : select count(*) from ct3 group by c3 print ====> sql : select count(*) from ct3 group by c3
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c4 sql select count(*) from ct3 group by c4
print ====> sql : select count(*) from ct3 group by c4 print ====> sql : select count(*) from ct3 group by c4
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c5 sql select count(*) from ct3 group by c5
print ====> sql : select count(*) from ct3 group by c5 print ====> sql : select count(*) from ct3 group by c5
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c6 sql select count(*) from ct3 group by c6
print ====> sql : select count(*) from ct3 group by c6 print ====> sql : select count(*) from ct3 group by c6
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c7 sql select count(*) from ct3 group by c7
print ====> sql : select count(*) from ct3 group by c7 print ====> sql : select count(*) from ct3 group by c7
print ====> rows: $rows print ====> rows: $rows
if $rows != 2 then if $rows != 3 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c8 sql select count(*) from ct3 group by c8
print ====> sql : select count(*) from ct3 group by c8 print ====> sql : select count(*) from ct3 group by c8
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c9 sql select count(*) from ct3 group by c9
print ====> sql : select count(*) from ct3 group by c9 print ====> sql : select count(*) from ct3 group by c9
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
sql select count(*) from ct3 group by c10 sql select count(*) from ct3 group by c10
print ====> sql : select count(*) from ct3 group by c10 print ====> sql : select count(*) from ct3 group by c10
print ====> rows: $rows print ====> rows: $rows
if $rows != 8 then if $rows != 9 then
return -1 return -1
endi endi
print ================ query 2 complex with group by print ================ query 2 complex with group by
sql select count(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select abs(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select abs(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select acos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select acos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select asin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select asin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select atan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select atan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select ceil(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select ceil(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select cos(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select cos(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select floor(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select floor(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select log(c1,10) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select log(c1,10) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select pow(c1,3) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select pow(c1,3) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select round(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select round(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select sqrt(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select sqrt(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select sin(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select sin(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql select tan(c1) from ct3 where c1 > 2 group by c7 limit 1 offset 1 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 c7 limit 1 offset 2 print ====> sql : select tan(c1) from ct3 where c1 > 2 group by c1 limit 1 offset 2
print ====> rows: $rows print ====> rows: $rows
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
#system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT