Merge pull request #7293 from taosdata/hotfix/TD-5934
[TD-5934]add test case
This commit is contained in:
commit
5b0d3421b9
|
@ -1050,6 +1050,27 @@ sql_error select min(c3) from m_fl_mt0 interval(10w) fill(value, 20)
|
|||
sql_error select max(c3) from m_fl_mt0 interval(1n) fill(prev)
|
||||
sql_error select min(c3) from m_fl_mt0 interval(1y) fill(value, 20)
|
||||
|
||||
sql create table nexttb1 (ts timestamp, f1 int);
|
||||
sql insert into nexttb1 values ('2021-08-08 1:1:1', NULL);
|
||||
sql insert into nexttb1 values ('2021-08-08 1:1:5', 3);
|
||||
|
||||
sql select last(*) from nexttb1 where ts >= '2021-08-08 1:1:1' and ts < '2021-08-08 1:1:10' interval(1s) fill(next);
|
||||
if $rows != 9 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != @21-08-08 01:01:01.000@ then
|
||||
return -1
|
||||
endi
|
||||
if $data01 != @21-08-08 01:01:01.000@ then
|
||||
return -1
|
||||
endi
|
||||
if $data02 != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
|
||||
|
||||
print =============== clear
|
||||
#sql drop database $db
|
||||
#sql show databases
|
||||
|
@ -1057,4 +1078,4 @@ print =============== clear
|
|||
# return -1
|
||||
#endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -1148,3 +1148,21 @@ endi
|
|||
|
||||
|
||||
sql select derivative(test_column_alias_name, 1s, 0) from (select avg(k) test_column_alias_name from t1 interval(1s));
|
||||
|
||||
sql create table smeters (ts timestamp, current float, voltage int);
|
||||
sql insert into smeters values ('2021-08-08 10:10:10', 10, 1);
|
||||
sql insert into smeters values ('2021-08-08 10:10:12', 10, 2);
|
||||
|
||||
sql select stddev(voltage) from smeters where ts>='2021-08-08 10:10:10.000' and ts < '2021-08-08 10:10:20.000' and current=10 interval(1000a);
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != @21-08-08 10:10:10.000@ then
|
||||
return -1
|
||||
endi
|
||||
if $data10 != @21-08-08 10:10:12.000@ then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue