diff --git a/tests/script/general/field/2.sim b/tests/script/general/field/2.sim index dc39e5ad602276e52bda3cce0e823a3deb3f124d..cc6889fd75441c9fa4913f8219ebc1b50710b0cb 100644 --- a/tests/script/general/field/2.sim +++ b/tests/script/general/field/2.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0, 0 ) + sql insert into $tb values (1626739200000 + $ms , 0, 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1, 1 ) + sql insert into $tb values (1626739200000 + $ms , 1, 1 ) $x = $x + 1 endw $i = $i + 1 @@ -116,103 +116,104 @@ if $rows != 100 then endi print =============== step4 -sql select * from $mt where ts > now + 4m and tbcol = 1 +# sql select * from $mt where ts > 1626739440001 and tbcol = 1 +sql select * from $mt where ts > 1626739440001 and tbcol = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol = 0 +sql select * from $mt where ts < 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol <> 0 +sql select * from $mt where ts >= 1626739440001 and ts < 1626739500001 and tbcol <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 0 and ts < now + 5m +sql select * from $mt where ts >= 1626739440001 and tbcol <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step5 -sql select * from $mt where ts > now + 4m and tbcol2 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 +sql select * from $mt where ts >= 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m +sql select * from $mt where ts >= 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step6 -sql select * from $mt where ts > now + 4m and tbcol2 = 1 and tbcol = 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 and tbcol = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 1 and tbcol <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 and tbcol <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 = 0 and tbcol = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 <> 0 and tbcol <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 = 0 and tbcol = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 and tbcol <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 and tbcol <> 0 +sql select * from $mt where ts >= 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m and ts < now + 5m and tbcol <> 0 +sql select * from $mt where ts >= 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol <> 0 if $rows != 5 then return -1 endi @@ -246,7 +247,7 @@ if $data00 != 100 then endi print =============== step9 -sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m +sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts <= 1626739440001 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 50 then return -1 @@ -272,7 +273,7 @@ if $data00 != 100 then endi print =============== step11 -sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m and tbcol = 1 group by tgcol +sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts <= 1626739440001 and tbcol = 1 group by tgcol print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/3.sim b/tests/script/general/field/3.sim index b45e3a005b4af41494ef24cf93b130d2b41c8dc1..cb3c6621ac3723b09fba489d894657a457e12af1 100644 --- a/tests/script/general/field/3.sim +++ b/tests/script/general/field/3.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0, 0, 0 ) + sql insert into $tb values (1626739200000 + $ms , 0, 0, 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1, 1, 1 ) + sql insert into $tb values (1626739200000 + $ms , 1, 1, 1 ) $x = $x + 1 endw $i = $i + 1 @@ -53,19 +53,19 @@ if $rows != $totalNum then return -1 endi -sql select * from $mt where ts < now + 4m +sql select * from $mt where ts <= 1626739440001 if $rows != 50 then return -1 endi -sql select * from $mt where ts > now + 4m +sql select * from $mt where ts > 1626739440001 if $rows != 150 then return -1 endi -sql select * from $mt where ts = now + 4m +sql select * from $mt where ts = 1626739440001 if $rows != 0 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m +sql select * from $mt where ts >= 1626739440001 and ts < 1626739500001 if $rows != 10 then return -1 endi @@ -141,239 +141,239 @@ if $rows != 100 then endi print =============== step6 -sql select * from $mt where ts > now + 4m and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol1 <> 0 +sql select * from $mt where ts >= 1626739440001 and ts < 1626739500001 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 0 and ts < now + 5m +sql select * from $mt where ts >= 1626739440001 and tbcol1 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step7 -sql select * from $mt where ts > now + 4m and tbcol2 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 +sql select * from $mt where ts >= 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m +sql select * from $mt where ts >= 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step8 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 +sql select * from $mt where ts >= 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m +sql select * from $mt where ts >= 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step9 -sql select * from $mt where ts > now + 4m and tbcol2 = 1 and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 1 and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 = 0 and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 = 0 and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m and ts < now + 5m and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol1 <> 0 if $rows != 5 then return -1 endi print =============== step10 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol1 <> 0 if $rows != 5 then return -1 endi print =============== step11 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol2 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol2 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol2 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol2 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol2 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts >= 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 +sql select * from $mt where ts >= 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 if $rows != 5 then return -1 endi print =============== step12 -sql select * from $mt where ts > now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts >= 1626739440001 and ts < 1626739500001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts >= 1626739440001 and tbcol1 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi @@ -405,25 +405,25 @@ if $data00 != 100 then endi print =============== step15 -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts <= 1626739440001 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 50 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 @@ -468,25 +468,25 @@ if $data00 != 100 then endi print =============== step18 -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/4.sim b/tests/script/general/field/4.sim index e219be87783cfea2f071db481a1f8eb457f20f5e..2d893da777bea8260a333a957cf6f904b95eb6d0 100644 --- a/tests/script/general/field/4.sim +++ b/tests/script/general/field/4.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0, 0, 0, 0 ) + sql insert into $tb values (1626739200000 + $ms , 0, 0, 0, 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1, 1, 1, 1 ) + sql insert into $tb values (1626739200000 + $ms , 1, 1, 1, 1 ) $x = $x + 1 endw $i = $i + 1 @@ -53,19 +53,19 @@ if $rows != $totalNum then return -1 endi -sql select * from $mt where ts < now + 4m +sql select * from $mt where ts < 1626739440001 if $rows != 50 then return -1 endi -sql select * from $mt where ts > now + 4m +sql select * from $mt where ts > 1626739440001 if $rows != 150 then return -1 endi -sql select * from $mt where ts = now + 4m +sql select * from $mt where ts = 1626739440001 if $rows != 0 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 if $rows != 10 then return -1 endi @@ -159,375 +159,375 @@ if $rows != 100 then endi print =============== step7 -sql select * from $mt where ts > now + 4m and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step8 -sql select * from $mt where ts > now + 4m and tbcol2 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step9 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step10 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step11 -sql select * from $mt where ts > now + 4m and tbcol2 = 1 and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 1 and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 = 0 and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 = 0 and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m and ts < now + 5m and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol1 <> 0 if $rows != 5 then return -1 endi print =============== step12 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol1 <> 0 if $rows != 5 then return -1 endi print =============== step13 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol2 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol2 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol2 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol2 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol2 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 if $rows != 5 then return -1 endi print =============== step14 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol4 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol4 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol4 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol4 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol4 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol4 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol4 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol4 <> 0 if $rows != 5 then return -1 endi print =============== step15 -sql select * from $mt where ts > now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi print =============== step16 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi print =============== step17 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi @@ -565,31 +565,31 @@ if $data00 != 100 then endi print =============== step20 -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 50 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 @@ -646,31 +646,31 @@ if $data00 != 100 then endi print =============== step23 -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/5.sim b/tests/script/general/field/5.sim index e02bbd122ff00a0f727ff8706e4a5cc3cf28a57b..e1421bdb4f9e25b37deeafe699feb1ce8c0f6c0a 100644 --- a/tests/script/general/field/5.sim +++ b/tests/script/general/field/5.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0, 0, 0, 0, 0 ) + sql insert into $tb values (1626739200000 + $ms , 0, 0, 0, 0, 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1, 1, 1, 1, 1 ) + sql insert into $tb values (1626739200000 + $ms , 1, 1, 1, 1, 1 ) $x = $x + 1 endw $i = $i + 1 @@ -53,19 +53,19 @@ if $rows != $totalNum then return -1 endi -sql select * from $mt where ts < now + 4m +sql select * from $mt where ts < 1626739440001 if $rows != 50 then return -1 endi -sql select * from $mt where ts > now + 4m +sql select * from $mt where ts > 1626739440001 if $rows != 150 then return -1 endi -sql select * from $mt where ts = now + 4m +sql select * from $mt where ts = 1626739440001 if $rows != 0 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 if $rows != 10 then return -1 endi @@ -177,443 +177,443 @@ if $rows != 100 then endi print =============== step8 -sql select * from $mt where ts > now + 4m and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step9 -sql select * from $mt where ts > now + 4m and tbcol2 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step10 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step11 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step12 -sql select * from $mt where ts > now + 4m and tbcol5 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol5 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol5 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol5 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol5 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol5 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol5 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol5 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol5 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol5 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol5 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol5 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol5 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol5 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol5 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol5 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step13 -sql select * from $mt where ts > now + 4m and tbcol2 = 1 and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 1 and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 = 0 and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 = 0 and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m and ts < now + 5m and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol1 <> 0 if $rows != 5 then return -1 endi print =============== step14 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol2 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol2 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol2 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol2 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol2 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 if $rows != 5 then return -1 endi print =============== step15 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol4 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol4 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol4 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol4 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol4 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol4 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol4 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol4 <> 0 if $rows != 5 then return -1 endi print =============== step16 -sql select * from $mt where ts > now + 4m and tbcol5 = 1 and tbcol4 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol5 = 1 and tbcol4 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol5 <> 1 and tbcol4 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol5 <> 1 and tbcol4 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol5 = 0 and tbcol4 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol5 = 0 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol5 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol5 <> 0 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol5 = 0 and tbcol4 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol5 = 0 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol5 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol5 <> 0 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol5 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol5 <> 0 and tbcol4 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol5 <> 0 and ts < now + 5m and ts < now + 5m and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol5 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol4 <> 0 if $rows != 5 then return -1 endi print =============== step17 -sql select * from $mt where ts > now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi print =============== step18 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi print =============== step19 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi print =============== step20 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 and tbcol5 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 and tbcol5 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 and tbcol5 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 and tbcol5 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 if $rows != 5 then return -1 endi @@ -657,37 +657,37 @@ if $data00 != 100 then endi print =============== step23 -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 50 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 @@ -756,37 +756,37 @@ if $data00 != 100 then endi print =============== step26 -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/6.sim b/tests/script/general/field/6.sim index a852230cea7fd53f1fbc8e6cd44a67ba137ab3b3..27475d591fc6acaffb4e1f985f59d9a3c8778df5 100644 --- a/tests/script/general/field/6.sim +++ b/tests/script/general/field/6.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0, 0, 0, 0, 0, 0 ) + sql insert into $tb values (1626739200000 + $ms , 0, 0, 0, 0, 0, 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1, 1, 1, 1, 1, 1 ) + sql insert into $tb values (1626739200000 + $ms , 1, 1, 1, 1, 1, 1 ) $x = $x + 1 endw $i = $i + 1 @@ -53,19 +53,19 @@ if $rows != $totalNum then return -1 endi -sql select * from $mt where ts < now + 4m +sql select * from $mt where ts < 1626739440001 if $rows != 50 then return -1 endi -sql select * from $mt where ts > now + 4m +sql select * from $mt where ts > 1626739440001 if $rows != 150 then return -1 endi -sql select * from $mt where ts = now + 4m +sql select * from $mt where ts = 1626739440001 if $rows != 0 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 if $rows != 10 then return -1 endi @@ -195,545 +195,545 @@ if $rows != 100 then endi print =============== step9 -sql select * from $mt where ts > now + 4m and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step10 -sql select * from $mt where ts > now + 4m and tbcol2 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step11 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step12 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step13 -sql select * from $mt where ts > now + 4m and tbcol5 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol5 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol5 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol5 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol5 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol5 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol5 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol5 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol5 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol5 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol5 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol5 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol5 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol5 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol5 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol5 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step14 -sql select * from $mt where ts > now + 4m and tbcol6 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol6 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol6 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol6 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol6 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol6 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol6 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol6 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol6 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol6 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol6 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol6 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol6 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol6 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol6 <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol6 <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi print =============== step15 -sql select * from $mt where ts > now + 4m and tbcol2 = 1 and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 1 and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 = 0 and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 = 0 and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m and ts < now + 5m and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol1 <> 0 if $rows != 5 then return -1 endi print =============== step16 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol2 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol2 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol2 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol2 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol2 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol2 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol2 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol2 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol2 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 if $rows != 5 then return -1 endi print =============== step17 -sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol4 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol4 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol4 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol4 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol4 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol4 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol4 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol4 <> 0 if $rows != 5 then return -1 endi print =============== step18 -sql select * from $mt where ts > now + 4m and tbcol5 = 1 and tbcol4 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol5 = 1 and tbcol4 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol5 <> 1 and tbcol4 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol5 <> 1 and tbcol4 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol5 = 0 and tbcol4 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol5 = 0 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol5 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol5 <> 0 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol5 = 0 and tbcol4 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol5 = 0 and tbcol4 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol5 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol5 <> 0 and tbcol4 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol5 <> 0 and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol5 <> 0 and tbcol4 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol5 <> 0 and ts < now + 5m and ts < now + 5m and tbcol4 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol5 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol4 <> 0 if $rows != 5 then return -1 endi print =============== step19 -sql select * from $mt where ts > now + 4m and tbcol5 = 1 and tbcol6 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol5 = 1 and tbcol6 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol5 <> 1 and tbcol6 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol5 <> 1 and tbcol6 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol5 = 0 and tbcol6 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol5 = 0 and tbcol6 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol5 <> 0 and tbcol6 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol5 <> 0 and tbcol6 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol5 = 0 and tbcol6 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol5 = 0 and tbcol6 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol5 <> 0 and tbcol6 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol5 <> 0 and tbcol6 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol5 <> 0 and tbcol6 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol5 <> 0 and tbcol6 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol5 <> 0 and ts < now + 5m and ts < now + 5m and tbcol6 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol5 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol6 <> 0 if $rows != 5 then return -1 endi print =============== step20 -sql select * from $mt where ts > now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol1 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol1 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi print =============== step21 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 if $rows != 5 then return -1 endi print =============== step22 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 if $rows != 5 then return -1 endi print =============== step23 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 and tbcol5 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 and tbcol5 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 and tbcol5 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 and tbcol5 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 if $rows != 5 then return -1 endi print =============== step24 -sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 and tbcol5 = 1 and tbcol6 = 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 and tbcol5 = 1 and tbcol6 = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 and tbcol5 <> 1 and tbcol6 <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 and tbcol5 <> 1 and tbcol6 <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 and tbcol6 = 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 and tbcol6 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 and tbcol6 <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 and tbcol6 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 and tbcol6 = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0 and tbcol6 = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 and tbcol6 <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 and tbcol6 <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 and tbcol6 <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 and tbcol6 <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 and tbcol6 <> 0 +sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0 and tbcol6 <> 0 if $rows != 5 then return -1 endi @@ -783,43 +783,43 @@ if $data00 != 100 then endi print =============== step27 -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 50 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 and tbcol6 = 1 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 and tbcol6 = 1 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 @@ -900,43 +900,43 @@ if $data00 != 100 then endi print =============== step30 -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 endi -sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 and tbcol6 = 1 group by tgcol2 +sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 and tbcol6 = 1 group by tgcol2 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/bigint.sim b/tests/script/general/field/bigint.sim index 538f966c49cc3eefb8516c4bac4a49b9efd78d37..cfe8c561f0d852133267f7dd597f7796aee951f0 100644 --- a/tests/script/general/field/bigint.sim +++ b/tests/script/general/field/bigint.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0 ) + sql insert into $tb values (1626739200000 + $ms , 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1 ) + sql insert into $tb values (1626739200000 + $ms , 1 ) $x = $x + 1 endw $i = $i + 1 @@ -82,35 +82,35 @@ if $rows != 100 then endi print =============== step3 -sql select * from $mt where ts > now + 4m and tbcol = 1 +sql select * from $mt where ts > 1626739440001 and tbcol = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol = 0 +sql select * from $mt where ts < 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi @@ -139,7 +139,7 @@ if $data00 != 100 then endi print =============== step7 -sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m and tbcol = 1 group by tgcol +sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1626739440001 and tbcol = 1 group by tgcol print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/binary.sim b/tests/script/general/field/binary.sim index d601750b0d96b94bd60751de62c7fd139e1882be..821dbc9a82f7d8e6e21be419d6c28a7b67f1271d 100644 --- a/tests/script/general/field/binary.sim +++ b/tests/script/general/field/binary.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , '0' ) + sql insert into $tb values (1626739200000 + $ms , '0' ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , '1' ) + sql insert into $tb values (1626739200000 + $ms , '1' ) $x = $x + 1 endw $i = $i + 1 @@ -55,14 +55,14 @@ if $rows != 100 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol = '1' +sql select * from $mt where ts > 1626739440001 and tbcol = '1' if $rows != 75 then return -1 endi print select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tbcol = '1' sql_error select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tbcol = '1' group by tgcol -sql_error select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m and tbcol = '1' group by tgcol +sql_error select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1626739440001 and tbcol = '1' group by tgcol sql_error select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tbcol = '1' interval(1d) group by tgcol #can't filter binary fields diff --git a/tests/script/general/field/bool.sim b/tests/script/general/field/bool.sim index 796ed4e0aaa4c1b0b61462ef95ffaf98a671f2ed..d94071b3282613a51c7580fc23f0bdc700cea03f 100644 --- a/tests/script/general/field/bool.sim +++ b/tests/script/general/field/bool.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0 ) + sql insert into $tb values (1626739200000 + $ms , 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1 ) + sql insert into $tb values (1626739200000 + $ms , 1 ) $x = $x + 1 endw $i = $i + 1 @@ -82,35 +82,35 @@ if $rows != 100 then endi print =============== step3 -sql select * from $mt where ts > now + 4m and tbcol = true +sql select * from $mt where ts > 1626739440001 and tbcol = true if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> true +sql select * from $mt where ts > 1626739440001 and tbcol <> true if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol = false +sql select * from $mt where ts < 1626739440001 and tbcol = false if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol <> false +sql select * from $mt where ts < 1626739440001 and tbcol <> false if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol = false +sql select * from $mt where ts <= 1626739440001 and tbcol = false if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol <> false +sql select * from $mt where ts <= 1626739440001 and tbcol <> false if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol <> false +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol <> false if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> false and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol <> false and ts < 1626739500001 if $rows != 5 then return -1 endi @@ -137,7 +137,7 @@ if $data00 != 100 then endi print =============== step7 -sql select count(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m and tbcol = true group by tgcol +sql select count(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1626739440001 and tbcol = true group by tgcol print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/double.sim b/tests/script/general/field/double.sim index ef86585e5f69fdd63c417ef823a57f3502436e40..0c9c23e3047466da264fd2ac3b2624ff22a5d0b0 100644 --- a/tests/script/general/field/double.sim +++ b/tests/script/general/field/double.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0 ) + sql insert into $tb values (1626739200000 + $ms , 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1 ) + sql insert into $tb values (1626739200000 + $ms , 1 ) $x = $x + 1 endw $i = $i + 1 @@ -82,35 +82,35 @@ if $rows != 100 then endi print =============== step3 -sql select * from $mt where ts > now + 4m and tbcol = 1 +sql select * from $mt where ts > 1626739440001 and tbcol = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol = 0 +sql select * from $mt where ts < 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi @@ -137,7 +137,7 @@ if $data00 != 100 then endi print =============== step7 -sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m and tbcol = 1 group by tgcol +sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1626739440001 and tbcol = 1 group by tgcol print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/float.sim b/tests/script/general/field/float.sim index a01bcbdd4ca2a7a7b7009ded641cd88357fbcc07..00423c00b8515bafb7974604e1211c15868512d7 100644 --- a/tests/script/general/field/float.sim +++ b/tests/script/general/field/float.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0 ) + sql insert into $tb values (1626739200000 + $ms , 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1 ) + sql insert into $tb values (1626739200000 + $ms , 1 ) $x = $x + 1 endw $i = $i + 1 @@ -82,35 +82,35 @@ if $rows != 100 then endi print =============== step3 -sql select * from $mt where ts > now + 4m and tbcol = 1 +sql select * from $mt where ts > 1626739440001 and tbcol = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol = 0 +sql select * from $mt where ts < 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi @@ -137,7 +137,7 @@ if $data00 != 100 then endi print =============== step7 -sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m and tbcol = 1 group by tgcol +sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1626739440001 and tbcol = 1 group by tgcol print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/int.sim b/tests/script/general/field/int.sim index c04fe5d2b1d4cc2d43de0111d3e22dcd177fa8fc..0e322e4f120d6eef933023467d1246a127780529 100644 --- a/tests/script/general/field/int.sim +++ b/tests/script/general/field/int.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0 ) + sql insert into $tb values (1626739200000 + $ms , 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1 ) + sql insert into $tb values (1626739200000 + $ms , 1 ) $x = $x + 1 endw $i = $i + 1 @@ -82,35 +82,35 @@ if $rows != 100 then endi print =============== step3 -sql select * from $mt where ts > now + 4m and tbcol = 1 +sql select * from $mt where ts > 1626739440001 and tbcol = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol = 0 +sql select * from $mt where ts < 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi @@ -137,7 +137,7 @@ if $data00 != 100 then endi print =============== step7 -sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m and tbcol = 1 group by tgcol +sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1626739440001 and tbcol = 1 group by tgcol print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/single.sim b/tests/script/general/field/single.sim index 0cfb92aad5c795e14a304146419a97157176c3ac..3f6bf4309fac7ce45577094f3316c34edcd954c1 100644 --- a/tests/script/general/field/single.sim +++ b/tests/script/general/field/single.sim @@ -25,7 +25,7 @@ sql create table $tb (ts timestamp, tbcol int) $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , $x ) + sql insert into $tb values (1626739200000 + $ms , $x ) $x = $x + 1 endw @@ -111,18 +111,18 @@ if $rows != 0 then endi print =============== step3 -sql select * from $tb where ts < now + 4m +sql select * from $tb where ts < 1626739440001 if $rows != 5 then return -1 endi -sql select * from $tb where tbcol = 10 and ts < now + 4m -print select * from $tb where tbcol = 10 and ts < now + 4m +sql select * from $tb where tbcol = 10 and ts < 1626739440001 +print select * from $tb where tbcol = 10 and ts < 1626739440001 if $rows != 0 then return -1 endi -sql select * from $tb where tbcol = 4 and ts < now + 4m order by ts desc +sql select * from $tb where tbcol = 4 and ts < 1626739440001 order by ts desc if $rows != 1 then return -1 endi @@ -130,7 +130,7 @@ if $data01 != 4 then return -1 endi -sql select * from $tb where tbcol < 10 and ts < now + 4m order by ts desc +sql select * from $tb where tbcol < 10 and ts < 1626739440001 order by ts desc if $rows != 5 then return -1 endi @@ -138,7 +138,7 @@ if $data01 != 4 then return -1 endi -sql select * from $tb where tbcol < 10 and ts > now + 4m and ts < now + 5m order by ts desc +sql select * from $tb where tbcol < 10 and ts > 1626739440001 and ts < 1626739500001 order by ts desc print $rows $data00 $data01 if $rows != 1 then return -1 @@ -183,27 +183,27 @@ sql select count(*) from $tb where tbcol < 10 and tbcol > 5 order by ts asc -x s step4: print =============== step5 -sql select count(*) from $tb where ts < now + 4m +sql select count(*) from $tb where ts < 1626739440001 if $data00 != 5 then return -1 endi -#sql select count(*) from $tb where tbcol = 10 and ts < now + 4m +#sql select count(*) from $tb where tbcol = 10 and ts < 1626739440001 #if $data00 != 0 then # return -1 #endi -sql select count(*) from $tb where tbcol = 4 and ts < now + 4m +sql select count(*) from $tb where tbcol = 4 and ts < 1626739440001 if $data00 != 1 then return -1 endi -sql select count(*) from $tb where tbcol < 10 and ts < now + 4m +sql select count(*) from $tb where tbcol < 10 and ts < 1626739440001 if $data00 != 5 then return -1 endi -sql select count(*) from $tb where tbcol < 10 and ts > now + 4m and ts < now + 5m +sql select count(*) from $tb where tbcol < 10 and ts > 1626739440001 and ts < 1626739500001 if $data00 != 1 then return -1 endi diff --git a/tests/script/general/field/smallint.sim b/tests/script/general/field/smallint.sim index 1d5566812efcd8e59ccc339e53577246c61c7a63..78b2b998cfa56f368b1480716dabe8be38a45b9a 100644 --- a/tests/script/general/field/smallint.sim +++ b/tests/script/general/field/smallint.sim @@ -30,7 +30,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0 ) + sql insert into $tb values (1626739200000 + $ms , 0 ) $x = $x + 1 endw $i = $i + 1 @@ -41,7 +41,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1 ) + sql insert into $tb values (1626739200000 + $ms , 1 ) $x = $x + 1 endw $i = $i + 1 @@ -82,35 +82,35 @@ if $rows != 100 then endi print =============== step3 -sql select * from $mt where ts > now + 4m and tbcol = 1 +sql select * from $mt where ts > 1626739440001 and tbcol = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol = 0 +sql select * from $mt where ts < 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi @@ -137,7 +137,7 @@ if $data00 != 100 then endi print =============== step7 -sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m and tbcol = 1 group by tgcol +sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1626739440001 and tbcol = 1 group by tgcol print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/tinyint.sim b/tests/script/general/field/tinyint.sim index f10e3d293a9d847f4f71a585603598a69ddc5e1c..7e1a0c6e80022435a50c48398ee9098ce9ec43aa 100644 --- a/tests/script/general/field/tinyint.sim +++ b/tests/script/general/field/tinyint.sim @@ -31,7 +31,7 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0 ) + sql insert into $tb values (1626739200000 + $ms , 0 ) $x = $x + 1 endw $i = $i + 1 @@ -42,7 +42,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1 ) + sql insert into $tb values (1626739200000 + $ms , 1 ) $x = $x + 1 endw $i = $i + 1 @@ -83,35 +83,35 @@ if $rows != 100 then endi print =============== step3 -sql select * from $mt where ts > now + 4m and tbcol = 1 +sql select * from $mt where ts > 1626739440001 and tbcol = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol = 0 +sql select * from $mt where ts < 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi @@ -138,7 +138,7 @@ if $data00 != 100 then endi print =============== step7 -sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m and tbcol = 1 group by tgcol +sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1626739440001 and tbcol = 1 group by tgcol print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/field/unsigined_bigint.sim b/tests/script/general/field/unsigined_bigint.sim index 1cfe8ad15b31f38d2fc72d429a0c9af2cb5732fb..260128b5c2476911e8e1d809e63c7f89b4fd300a 100644 --- a/tests/script/general/field/unsigined_bigint.sim +++ b/tests/script/general/field/unsigined_bigint.sim @@ -31,11 +31,11 @@ while $i < 5 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 0 ) + sql insert into $tb values (1626739200000 + $ms , 0 ) $x = $x + 1 - sql_error insert into $tb values (now + $ms , -10) - sql_error insert into $tb values (now + $ms , -1000) - sql_error insert into $tb values (now + $ms , -10000000) + sql_error insert into $tb values (1626739200000 + $ms , -10) + sql_error insert into $tb values (1626739200000 + $ms , -1000) + sql_error insert into $tb values (1626739200000 + $ms , -10000000) endw $i = $i + 1 endw @@ -45,7 +45,7 @@ while $i < 10 $x = 0 while $x < $rowNum $ms = $x . m - sql insert into $tb values (now + $ms , 1 ) + sql insert into $tb values (1626739200000 + $ms , 1 ) $x = $x + 1 endw $i = $i + 1 @@ -86,35 +86,35 @@ if $rows != 100 then endi print =============== step3 -sql select * from $mt where ts > now + 4m and tbcol = 1 +sql select * from $mt where ts > 1626739440001 and tbcol = 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 1 +sql select * from $mt where ts > 1626739440001 and tbcol <> 1 if $rows != 75 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol = 0 +sql select * from $mt where ts < 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts < now + 4m and tbcol <> 0 +sql select * from $mt where ts < 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol = 0 +sql select * from $mt where ts <= 1626739440001 and tbcol = 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts <= now + 4m and tbcol <> 0 +sql select * from $mt where ts <= 1626739440001 and tbcol <> 0 if $rows != 25 then return -1 endi -sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol <> 0 +sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol <> 0 if $rows != 5 then return -1 endi -sql select * from $mt where ts > now + 4m and tbcol <> 0 and ts < now + 5m +sql select * from $mt where ts > 1626739440001 and tbcol <> 0 and ts < 1626739500001 if $rows != 5 then return -1 endi @@ -143,7 +143,7 @@ if $data00 != 100 then endi print =============== step7 -sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m and tbcol = 1 group by tgcol +sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1626739440001 and tbcol = 1 group by tgcol print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != 25 then return -1 diff --git a/tests/script/general/tag/3.sim b/tests/script/general/rm_bak/tag/3.sim similarity index 100% rename from tests/script/general/tag/3.sim rename to tests/script/general/rm_bak/tag/3.sim diff --git a/tests/script/general/tag/4.sim b/tests/script/general/rm_bak/tag/4.sim similarity index 100% rename from tests/script/general/tag/4.sim rename to tests/script/general/rm_bak/tag/4.sim diff --git a/tests/script/general/tag/5.sim b/tests/script/general/rm_bak/tag/5.sim similarity index 100% rename from tests/script/general/tag/5.sim rename to tests/script/general/rm_bak/tag/5.sim diff --git a/tests/script/general/tag/6.sim b/tests/script/general/rm_bak/tag/6.sim similarity index 100% rename from tests/script/general/tag/6.sim rename to tests/script/general/rm_bak/tag/6.sim diff --git a/tests/script/general/tag/add.sim b/tests/script/general/rm_bak/tag/add.sim similarity index 100% rename from tests/script/general/tag/add.sim rename to tests/script/general/rm_bak/tag/add.sim diff --git a/tests/script/general/tag/bigint.sim b/tests/script/general/rm_bak/tag/bigint.sim similarity index 100% rename from tests/script/general/tag/bigint.sim rename to tests/script/general/rm_bak/tag/bigint.sim diff --git a/tests/script/general/tag/binary.sim b/tests/script/general/rm_bak/tag/binary.sim similarity index 100% rename from tests/script/general/tag/binary.sim rename to tests/script/general/rm_bak/tag/binary.sim diff --git a/tests/script/general/tag/binary_binary.sim b/tests/script/general/rm_bak/tag/binary_binary.sim similarity index 100% rename from tests/script/general/tag/binary_binary.sim rename to tests/script/general/rm_bak/tag/binary_binary.sim diff --git a/tests/script/general/tag/bool.sim b/tests/script/general/rm_bak/tag/bool.sim similarity index 100% rename from tests/script/general/tag/bool.sim rename to tests/script/general/rm_bak/tag/bool.sim diff --git a/tests/script/general/tag/bool_binary.sim b/tests/script/general/rm_bak/tag/bool_binary.sim similarity index 100% rename from tests/script/general/tag/bool_binary.sim rename to tests/script/general/rm_bak/tag/bool_binary.sim diff --git a/tests/script/general/tag/bool_int.sim b/tests/script/general/rm_bak/tag/bool_int.sim similarity index 100% rename from tests/script/general/tag/bool_int.sim rename to tests/script/general/rm_bak/tag/bool_int.sim diff --git a/tests/script/general/tag/change.sim b/tests/script/general/rm_bak/tag/change.sim similarity index 100% rename from tests/script/general/tag/change.sim rename to tests/script/general/rm_bak/tag/change.sim diff --git a/tests/script/general/tag/column.sim b/tests/script/general/rm_bak/tag/column.sim similarity index 100% rename from tests/script/general/tag/column.sim rename to tests/script/general/rm_bak/tag/column.sim diff --git a/tests/script/general/tag/commit.sim b/tests/script/general/rm_bak/tag/commit.sim similarity index 100% rename from tests/script/general/tag/commit.sim rename to tests/script/general/rm_bak/tag/commit.sim diff --git a/tests/script/general/tag/create.sim b/tests/script/general/rm_bak/tag/create.sim similarity index 100% rename from tests/script/general/tag/create.sim rename to tests/script/general/rm_bak/tag/create.sim diff --git a/tests/script/general/tag/delete.sim b/tests/script/general/rm_bak/tag/delete.sim similarity index 100% rename from tests/script/general/tag/delete.sim rename to tests/script/general/rm_bak/tag/delete.sim diff --git a/tests/script/general/tag/double.sim b/tests/script/general/rm_bak/tag/double.sim similarity index 100% rename from tests/script/general/tag/double.sim rename to tests/script/general/rm_bak/tag/double.sim diff --git a/tests/script/general/tag/filter.sim b/tests/script/general/rm_bak/tag/filter.sim similarity index 100% rename from tests/script/general/tag/filter.sim rename to tests/script/general/rm_bak/tag/filter.sim diff --git a/tests/script/general/tag/float.sim b/tests/script/general/rm_bak/tag/float.sim similarity index 100% rename from tests/script/general/tag/float.sim rename to tests/script/general/rm_bak/tag/float.sim diff --git a/tests/script/general/tag/int.sim b/tests/script/general/rm_bak/tag/int.sim similarity index 100% rename from tests/script/general/tag/int.sim rename to tests/script/general/rm_bak/tag/int.sim diff --git a/tests/script/general/tag/int_binary.sim b/tests/script/general/rm_bak/tag/int_binary.sim similarity index 100% rename from tests/script/general/tag/int_binary.sim rename to tests/script/general/rm_bak/tag/int_binary.sim diff --git a/tests/script/general/tag/int_float.sim b/tests/script/general/rm_bak/tag/int_float.sim similarity index 100% rename from tests/script/general/tag/int_float.sim rename to tests/script/general/rm_bak/tag/int_float.sim diff --git a/tests/script/general/tag/set.sim b/tests/script/general/rm_bak/tag/set.sim similarity index 100% rename from tests/script/general/tag/set.sim rename to tests/script/general/rm_bak/tag/set.sim diff --git a/tests/script/general/tag/smallint.sim b/tests/script/general/rm_bak/tag/smallint.sim similarity index 100% rename from tests/script/general/tag/smallint.sim rename to tests/script/general/rm_bak/tag/smallint.sim diff --git a/tests/script/general/tag/testSuite.sim b/tests/script/general/rm_bak/tag/testSuite.sim similarity index 100% rename from tests/script/general/tag/testSuite.sim rename to tests/script/general/rm_bak/tag/testSuite.sim diff --git a/tests/script/general/tag/tinyint.sim b/tests/script/general/rm_bak/tag/tinyint.sim similarity index 100% rename from tests/script/general/tag/tinyint.sim rename to tests/script/general/rm_bak/tag/tinyint.sim diff --git a/tests/script/general/stream/agg_stream.sim b/tests/script/general/stream/agg_stream.sim index 65657fc33be88152040ce68c46d559e8b2c119a5..548f59cab7e6b3a81c5b01a62e02456f3c209720 100644 --- a/tests/script/general/stream/agg_stream.sim +++ b/tests/script/general/stream/agg_stream.sim @@ -20,7 +20,7 @@ print =============== step2 sql create database d4 precision 'us' sql use d4 sql create table t1 (ts timestamp, i int) -sql insert into d4.t1 values(now, 1) +sql insert into d4.t1 values(1626739200000, 1) sql create table d4.s001 as select count(cpu_taosd), count(cpu_system), avg(cpu_taosd), avg(cpu_system), sum(cpu_taosd), max(cpu_taosd), min(cpu_taosd) from log.dn_192_168_0_1 interval(5s) sql create table d4.s002 as select count(mem_taosd), count(mem_system), avg(mem_taosd), avg(mem_system), sum(mem_taosd), max(mem_taosd), min(mem_taosd) from log.dn_192_168_0_1 interval(5s) diff --git a/tests/script/general/stream/column_stream.sim b/tests/script/general/stream/column_stream.sim index c43ca1fd5ac7cfc5e477c970b313414469e9a29c..59a65f0969ebc6e2fd6d62c5b3fcc1bf66c420b7 100644 --- a/tests/script/general/stream/column_stream.sim +++ b/tests/script/general/stream/column_stream.sim @@ -23,7 +23,7 @@ print =============== step2 sql create database d4 precision 'us' sql use d4 sql create table t1 (ts timestamp, i int) -sql insert into d4.t1 values(now, 1) +sql insert into d4.t1 values(1626739200000, 1) sql create table d4.s1 as select count(cpu_taosd), count(cpu_system), avg(cpu_taosd), avg(cpu_system), sum(cpu_taosd), max(cpu_taosd), min(cpu_taosd), stddev(cpu_taosd), count(*) as c1, count(*) as c2, count(*) as c3, count(*) as c4, count(*) as c5, count(*) as c6, count(*) as c7, count(*) as c8, count(*) as c9, count(*) as c10, count(*) as c11, count(*) as c12, count(*) as c13, count(*) as c14, count(*) as c15, count(*) as c16, count(*) as c17, count(*) as c18, count(*) as c19, count(*) as c20, count(*) as c21, count(*) as c22, count(*) as c23, count(*) as c24, count(*) as c25, count(*) as c26, count(*) as c27, count(*) as c28, count(*) as c29, count(*) as c30 from log.dn_192_168_0_1 interval(5s) diff --git a/tests/script/general/stream/metrics_replica1_vnoden.sim b/tests/script/general/stream/metrics_replica1_vnoden.sim index 4629063c4460c10dccc844b6b39e512012638379..db1044a597510048c4b812d8a3a16d53ff4e5ac0 100644 --- a/tests/script/general/stream/metrics_replica1_vnoden.sim +++ b/tests/script/general/stream/metrics_replica1_vnoden.sim @@ -37,11 +37,11 @@ while $i < $tbNum $tb = $tbPrefix . $i sql create table $tb using $mt tags( $i ) - $x = -1440 + $x = -400 $y = 0 while $y < $rowNum $ms = $x . m - sql insert into $tb values (now $ms , $y , $y ) + sql insert into $tb values (1626739200000 $ms , $y , $y ) $x = $x + 1 $y = $y + 1 endw @@ -143,14 +143,14 @@ $st = $stPrefix . la sql create table $st as select last(tbcol) from $mt interval(1d) print =============== step11 wh -sql select count(tbcol) from $mt where ts < now + 4m interval(1d) -print select count(tbcol) from $mt where ts < now + 4m interval(1d) ===> $data00 $data01 +sql select count(tbcol) from $mt where ts < 1626739440001 interval(1d) +print select count(tbcol) from $mt where ts < 1626739440000 interval(1d) ===> $data00 $data01 if $data01 != 200 then return -1 endi $st = $stPrefix . wh -#sql create table $st as select count(tbcol) from $mt where ts < now + 4m interval(1d) +#sql create table $st as select count(tbcol) from $mt where ts < 1626739200000 + 4m interval(1d) print =============== step12 as sql select count(tbcol) from $mt interval(1d) diff --git a/tests/script/general/stream/restart_stream.sim b/tests/script/general/stream/restart_stream.sim index c8be10103d16a856fb0c083546cfaf8b939a1b98..62e47f9b3a6c12668409293769ee7c5a12a718ac 100644 --- a/tests/script/general/stream/restart_stream.sim +++ b/tests/script/general/stream/restart_stream.sim @@ -34,11 +34,11 @@ while $i < 10 $tb = $tbPrefix . $i sql create table $tb using $mt tags( 0 ) - $x = -1440 + $x = -400 $y = 0 while $y < $rowNum - $ms = $x . m - sql insert into $tb values (now $ms , $y , $y ) + $ms = $x . m + sql insert into $tb values (1626739200000 $ms , $y , $y ) $x = $x + 1 $y = $y + 1 endw @@ -54,7 +54,7 @@ sql select count(*) from $tb interval(1d) print ===>rows $rows, data $data01 if $rows != 1 then return -1 -endi +endi if $data01 != 20 then return -1 endi @@ -114,11 +114,11 @@ while $i < 5 $tb = $tbPrefix . $i sql create table $tb using $mt tags( 0 ) - $x = -1440 + $x = -400 $y = 0 while $y < $rowNum $ms = $x . m - sql insert into $tb values (now $ms , $y , $y ) + sql insert into $tb values (1626739200000 $ms , $y , $y ) $x = $x + 1 $y = $y + 1 endw diff --git a/tests/script/general/stream/stream_3.sim b/tests/script/general/stream/stream_3.sim index 31490dc5ac44b93f0daf02cd0ba3b4d77a3be20b..b043993814db2ea5bf8c6a3513317efca50b51d3 100644 --- a/tests/script/general/stream/stream_3.sim +++ b/tests/script/general/stream/stream_3.sim @@ -34,11 +34,11 @@ while $i < $tbNum $tb = $tbPrefix . $i sql create table $tb using $mt tags( $i ) - $x = -1440 + $x = -400 $y = 0 while $y < $rowNum $ms = $x . m - sql insert into $tb values (now $ms , $y , $y ) + sql insert into $tb values (1626739200000 $ms , $y , $y ) $x = $x + 1 $y = $y + 1 endw @@ -139,11 +139,11 @@ while $i < $tbNum $tb = $tbPrefix . $i sql create table $tb using $mt tags( $i ) - $x = -1440 + $x = -400 $y = 0 while $y < $rowNum $ms = $x . m - sql insert into $tb values (now $ms , $y , $y ) + sql insert into $tb values (1626739200000 $ms , $y , $y ) $x = $x + 1 $y = $y + 1 endw diff --git a/tests/script/general/stream/stream_restart.sim b/tests/script/general/stream/stream_restart.sim index 4bf6760703ef744572a0b172cb860141f8768ff5..54a60a00811de0253d1ad1110b69f2587f707aa1 100644 --- a/tests/script/general/stream/stream_restart.sim +++ b/tests/script/general/stream/stream_restart.sim @@ -37,7 +37,7 @@ while $i < $tbNum $y = 0 while $y < $rowNum $ms = $x . s - sql insert into $tb values (now + $ms , $y , $y ) + sql insert into $tb values (1626739200000 + $ms , $y , $y ) $x = $x + 1 $y = $y + 1 endw diff --git a/tests/script/general/stream/table_del.sim b/tests/script/general/stream/table_del.sim index 3cbce538d5a87553289b834bd15dea1f43da35fb..34673605d63b39b9fd809aaedd94f4e6ef80f5b7 100644 --- a/tests/script/general/stream/table_del.sim +++ b/tests/script/general/stream/table_del.sim @@ -34,11 +34,11 @@ while $i < $tbNum $tb = $tbPrefix . $i sql create table $tb using $mt tags( $i ) - $x = -1440 + $x = -400 $y = 0 while $y < $rowNum $ms = $x . m - sql insert into $tb values (now $ms , $y , $y ) + sql insert into $tb values (1626739200000 $ms , $y , $y ) $x = $x + 1 $y = $y + 1 endw diff --git a/tests/script/general/stream/table_replica1_vnoden.sim b/tests/script/general/stream/table_replica1_vnoden.sim index be67a31b4e6782e81289b03fb267db501f341520..4a6c4fe0462fc675e13785905ff1b707815fd168 100644 --- a/tests/script/general/stream/table_replica1_vnoden.sim +++ b/tests/script/general/stream/table_replica1_vnoden.sim @@ -37,11 +37,11 @@ while $i < $tbNum $tb = $tbPrefix . $i sql create table $tb using $mt tags( $i ) - $x = -1440 + $x = -400 $y = 0 while $y < $rowNum $ms = $x . m - sql insert into $tb values (now $ms , $y , $y ) + sql insert into $tb values (1626739200000 $ms , $y , $y ) $x = $x + 1 $y = $y + 1 endw @@ -176,14 +176,14 @@ $st = $stPrefix . pe sql create table $st as select percentile(tbcol, 1) from $tb interval(1d) print =============== step14 wh -sql select count(tbcol) from $tb where ts < now + 4m interval(1d) -print select count(tbcol) from $tb where ts < now + 4m interval(1d) ===> $data00 $data01 +sql select count(tbcol) from $tb where ts < 1626739440001 interval(1d) +print select count(tbcol) from $tb where ts < 1626739440001 interval(1d) ===> $data00 $data01 if $data01 != $rowNum then return -1 endi $st = $stPrefix . wh -#sql create table $st as select count(tbcol) from $tb where ts < now + 4m interval(1d) +#sql create table $st as select count(tbcol) from $tb where ts < 1626739200000 + 4m interval(1d) print =============== step15 as sql select count(tbcol) from $tb interval(1d) diff --git a/tests/script/general/table/fill.sim b/tests/script/general/table/fill.sim deleted file mode 100644 index 069eeff6cf0cdf35a55f33fa3e5bbf8135cc7921..0000000000000000000000000000000000000000 --- a/tests/script/general/table/fill.sim +++ /dev/null @@ -1,63 +0,0 @@ -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 - -print =================== step1 -sql create database db -sql use db -sql create table mt (ts timestamp, k int, h binary(20), t bigint, s float, f double, x smallint, y tinyint, z bool) tags (a int, b binary(20), c bigint) -sql create table tb using mt tags (0, '1', 2) - -sql insert into tb values(now -200d, 200, '1', 2, 3, 4, 5, 6, true); -sql insert into tb values(now -100d, 100, '1', 2, 3, 4, 5, 6, true); -sql insert into tb values(now -30d, 30, '1', 2, 3, 4, 5, 6, true); -sql insert into tb values(now -20d, 20, '1', 2, 3, 4, 5, 6, true); -sql insert into tb values(now -10d, 10, '1', 2, 3, 4, 5, 6, true); -sql insert into tb values(now -5d, 5, '1', 2, 3, 4, 5, 6, true); -sql insert into tb values(now -1d, 1, '1', 2, 3, 4, 5, 6, true); -sql insert into tb values(now, 0, '1', 2, 3, 4, 5, 6, true); - -sql select * from db.mt -if $rows != 8 then - return -1 -endi - -sql select * from db.tb -if $rows != 8 then - return -1 -endi - -sql select count(*) from db.mt -if $data00 != 8 then - return -1 -endi - -sql select count(*), last(ts), min(k), max(k), avg(k) from db.mt where a=0 and ts>="2016-4-29 8:0:0" and ts < "2018-7-18 8:9:0" interval(1d) fill(value, 1) -sql select count(*), last(ts), min(k), max(k), avg(k) from db.mt where a=0 and ts>="2016-4-29 8:0:0" and ts < "2018-7-18 8:9:0" interval(1d) fill(value, 1) - -print =================== step2 -system sh/exec.sh -n dnode1 -s stop -x SIGINT -sleep 3000 -system sh/exec.sh -n dnode1 -s start -sleep 2000 - -print =================== step3 -sql select * from db.mt -if $rows != 8 then - return -1 -endi - -sql select * from db.tb -if $rows != 8 then - return -1 -endi - -sql select count(*) from db.mt -if $data00 != 8 then - return -1 -endi diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index daac2caf5da086d538d0ec4845737a819f6fa1cd..6ad6a74eed76765a11e3cc875b7ff1ae51be648b 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -93,31 +93,7 @@ cd ../../../debug; make #======================b1-end=============== #======================b2-start=============== -./test.sh -f general/tag/3.sim -./test.sh -f general/tag/4.sim -./test.sh -f general/tag/5.sim -./test.sh -f general/tag/6.sim -./test.sh -f general/tag/add.sim -./test.sh -f general/tag/bigint.sim -./test.sh -f general/tag/binary_binary.sim -./test.sh -f general/tag/binary.sim -./test.sh -f general/tag/bool_binary.sim -./test.sh -f general/tag/bool_int.sim -./test.sh -f general/tag/bool.sim -./test.sh -f general/tag/change.sim -./test.sh -f general/tag/column.sim -./test.sh -f general/tag/commit.sim -./test.sh -f general/tag/create.sim -./test.sh -f general/tag/delete.sim -./test.sh -f general/tag/double.sim -./test.sh -f general/tag/filter.sim -./test.sh -f general/tag/float.sim -./test.sh -f general/tag/int_binary.sim -./test.sh -f general/tag/int_float.sim -./test.sh -f general/tag/int.sim -./test.sh -f general/tag/set.sim -./test.sh -f general/tag/smallint.sim -./test.sh -f general/tag/tinyint.sim + ./test.sh -f general/wal/sync.sim ./test.sh -f general/wal/kill.sim ./test.sh -f general/wal/maxtables.sim @@ -397,7 +373,6 @@ cd ../../../debug; make ./test.sh -f general/table/delete_writing.sim ./test.sh -f general/table/describe.sim ./test.sh -f general/table/double.sim -./test.sh -f general/table/fill.sim ./test.sh -f general/table/float.sim ./test.sh -f general/table/int.sim ./test.sh -f general/table/limit.sim