sql insert into tm0 values('2020-1-1 1:4:10', 10);
sql select max(k)-min(k),last(k)-first(k),0-spread(k) from tm0 where ts>='2020-1-1 1:1:1' and ts<='2020-1-1 1:2:15' interval(10s) fill(value, 99,91,90,89,88,87,86,85);
print select _wstart, max(k)-min(k),last(k)-first(k),0-spread(k) from tm0 where ts>='2020-1-1 1:1:1' and ts<='2020-1-1 1:2:15' interval(10s) fill(value, 99,91,90,89,88,87,86,85);
sql select _wstart, max(k)-min(k),last(k)-first(k),0-spread(k) from tm0 where ts>='2020-1-1 1:1:1' and ts<='2020-1-1 1:2:15' interval(10s) fill(value, 99,91,90,89,88,87,86,85);
if $rows != 8 then
return -1
endi
...
...
@@ -890,15 +885,15 @@ if $data10 != @20-01-01 01:01:10.000@ then
return -1
endi
if $data11 != 99.000000000 then
if $data11 != 1.000000000 then
return -1
endi
if $data12 != 91.000000000 then
if $data12 != 1.000000000 then
return -1
endi
if $data13 != 90.000000000 then
if $data13 != -87.000000000 then
return -1
endi
...
...
@@ -922,19 +917,19 @@ if $data70 != @20-01-01 01:02:10.000@ then
return -1
endi
if $data71 != 99.000000000 then
if $data71 != 1.000000000 then
return -1
endi
if $data72 != 91.000000000 then
if $data72 != 1.000000000 then
return -1
endi
if $data73 != 90.000000000 then
if $data73 != -87.000000000 then
return -1
endi
sql select first(k)-avg(k),0-spread(k) from tm0 where ts>='2020-1-1 1:1:1' and ts<='2020-1-1 1:2:15' interval(10s) fill(NULL);
sql select _wstart, first(k)-avg(k),0-spread(k) from tm0 where ts>='2020-1-1 1:1:1' and ts<='2020-1-1 1:2:15' interval(10s) fill(NULL);
if $rows != 8 then
return -1
endi
...
...
@@ -963,12 +958,13 @@ if $data12 != NULL then
return -1
endi
sql select max(k)-min(k),last(k)-first(k),0-spread(k) from tm0 where ts>='2020-1-1 1:1:1' and ts<='2020-1-1 4:2:15' interval(500a) fill(value, 99,91,90,89,88,87,86,85) order by ts asc;
sql select _wstart, max(k)-min(k),last(k)-first(k),0-spread(k) from tm0 where ts>='2020-1-1 1:1:1' and ts<='2020-1-1 4:2:15' interval(500a) fill(value, 99,91,90,89,88,87,86,85) ;
if $rows != 21749 then
return -1
endi
sql select max(k)-min(k),last(k)-first(k),0-spread(k),count(1) from m1 where ts>='2020-1-1 1:1:1' and ts<='2020-1-1 1:2:15' interval(10s) fill(value, 99,91,90,89,88,87,86,85) order by ts asc;
print select _wstart, max(k)-min(k),last(k)-first(k),0-spread(k),count(1) from m1 where ts>='2020-1-1 1:1:1' and ts<='2020-1-1 1:2:15' interval(10s) fill(value, 99,91,90,89,88,87,86,85) ;
sql select _wstart, max(k)-min(k),last(k)-first(k),0-spread(k),count(1) from m1 where ts>='2020-1-1 1:1:1' and ts<='2020-1-1 1:2:15' interval(10s) fill(value, 99,91,90,89,88,87,86,85) ;
if $rows != 8 then
return -1
endi
...
...
@@ -997,19 +993,19 @@ if $data10 != @20-01-01 01:01:10.000@ then
return -1
endi
if $data11 != 99.000000000 then
if $data11 != 1.000000000 then
return -1
endi
if $data12 != 91.000000000 then
if $data12 != 1.000000000 then
return -1
endi
if $data13 != 90.000000000 then
if $data13 != -87.000000000 then
return -1
endi
if $data14 != 89 then
if $data14 != 86 then
return -1
endi
...
...
@@ -1026,18 +1022,15 @@ endi
if $data01 != -4.000000000 then
return -1
endi
if $data02 != 0 then
if $data10 != 5 then
return -1
endi
if $data12 != 1 then
if $data11 != -4.000000000 then
return -1
endi
print =====================>td-1442, td-2190 , no time range for fill option
sql_error select count(*) from m_fl_tb0 interval(1s) fill(prev);
sql_error select min(c3) from m_fl_mt0 interval(10a) fill(value, 20)
sql_error select min(c3) from m_fl_mt0 interval(10s) fill(value, 20)
sql_error select min(c3) from m_fl_mt0 interval(10m) fill(value, 20)