sleep 100 sql connect sql use db; sql_error SELECT INTERP(c7) FROM tb1; sql_error SELECT INTERP(c8) FROM tb1; sql_error SELECT INTERP(c9) FROM tb1; sql_error SELECT INTERP(c1,c8) FROM tb1; sql_error SELECT INTERP(*) FROM tb1; sql_error SELECT INTERP(c1),INTERP(c8) FROM tb1; sql_error SELECT INTERP(c1),avg(c1) FROM tb1; sql_error SELECT INTERP(c1),c1 FROM tb1; sql_error SELECT INTERP(c1),top(c1,3) FROM tb1; sql_error SELECT INTERP(c1),first(c1) FROM tb1; sql_error SELECT INTERP(c1),count(c1) FROM tb1; sql_error SELECT INTERP(c1),ceil(c1) FROM tb1; sql_error SELECT c1,c2,interp(c1) FROM tb1; sql_error SELECT INTERP(c1) FROM stb1; sql_error SELECT interp(c1) FROM stb1 group by t1; sql_error SELECT interp(c1) FROM stb1 group by tbname,t1; sql_error SELECT interp(c1) FROM stb1 group by tbname,ts; sql_error SELECT interp(c1) FROM stb1 group by tbname,c1; sql_error SELECT INTERP(c1) FROM tb1 interval(1s); sql_error SELECT avg(c1) FROM tb1 every(1s); sql_error SELECT avg(c1) FROM tb1 range(0,1); sql_error SELECT INTERP(c1) FROM tb1 STATE_WINDOW(c1); sql_error SELECT INTERP(c1) FROM tb1 SESSION(ts,100s); sql SELECT INTERP(c1) FROM tb1; if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT ts,INTERP(c1) FROM tb1; if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != @21-10-20 10:00:00.000@ then return -1 endi if $data02 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 where ts > '2021-10-20 10:00:03' if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:06.000@ then return -1 endi if $data01 != 6 then return -1 endi sql SELECT INTERP(c1,c2,c3,c4,c6,c5) FROM tb1 every(1s); if $rows != 7 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data02 != 0.00000 then return -1 endi if $data03 != 0 then return -1 endi if $data04 != 0 then return -1 endi if $data05 != 0.000000000 then return -1 endi if $data06 != 0 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data12 != 1.00000 then return -1 endi if $data13 != 1 then return -1 endi if $data14 != 1 then return -1 endi if $data15 != 1.000000000 then return -1 endi if $data16 != 1 then return -1 endi if $data20 != @21-10-20 10:00:03.000@ then return -1 endi if $data21 != 3 then return -1 endi if $data22 != 3.00000 then return -1 endi if $data23 != 3 then return -1 endi if $data24 != 3 then return -1 endi if $data25 != 3.000000000 then return -1 endi if $data26 != 3 then return -1 endi if $data30 != @21-10-20 10:00:06.000@ then return -1 endi if $data31 != 6 then return -1 endi if $data32 != 6.00000 then return -1 endi if $data33 != 6 then return -1 endi if $data34 != 6 then return -1 endi if $data35 != 6.000000000 then return -1 endi if $data36 != 6 then return -1 endi if $data40 != @21-10-20 10:00:10.000@ then return -1 endi if $data41 != 10 then return -1 endi if $data42 != 10.00000 then return -1 endi if $data43 != 10 then return -1 endi if $data44 != 10 then return -1 endi if $data45 != 10.000000000 then return -1 endi if $data46 != 10 then return -1 endi if $data50 != @21-10-20 10:00:15.000@ then return -1 endi if $data51 != 15 then return -1 endi if $data52 != 15.00000 then return -1 endi if $data53 != 15 then return -1 endi if $data54 != 15 then return -1 endi if $data55 != 15.000000000 then return -1 endi if $data56 != 15 then return -1 endi if $data60 != @21-10-20 10:00:21.000@ then return -1 endi if $data61 != 21 then return -1 endi if $data62 != 21.00000 then return -1 endi if $data63 != 21 then return -1 endi if $data64 != 21 then return -1 endi if $data65 != 21.000000000 then return -1 endi if $data66 != 21 then return -1 endi sql SELECT INTERP(c1),interp(c2),interp(c3) FROM tb1 every(1s); if $rows != 7 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data02 != 0.00000 then return -1 endi if $data03 != 0 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data12 != 1.00000 then return -1 endi if $data13 != 1 then return -1 endi if $data20 != @21-10-20 10:00:03.000@ then return -1 endi if $data21 != 3 then return -1 endi if $data22 != 3.00000 then return -1 endi if $data23 != 3 then return -1 endi if $data30 != @21-10-20 10:00:06.000@ then return -1 endi if $data31 != 6 then return -1 endi if $data32 != 6.00000 then return -1 endi if $data33 != 6 then return -1 endi if $data40 != @21-10-20 10:00:10.000@ then return -1 endi if $data41 != 10 then return -1 endi if $data42 != 10.00000 then return -1 endi if $data43 != 10 then return -1 endi if $data50 != @21-10-20 10:00:15.000@ then return -1 endi if $data51 != 15 then return -1 endi if $data52 != 15.00000 then return -1 endi if $data53 != 15 then return -1 endi if $data60 != @21-10-20 10:00:21.000@ then return -1 endi if $data61 != 21 then return -1 endi if $data62 != 21.00000 then return -1 endi if $data63 != 21 then return -1 endi sql SELECT INTERP(c1),ts FROM tb1 every(1s); if $rows != 7 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data02 != @21-10-20 10:00:00.000@ then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data12 != @21-10-20 10:00:01.000@ then return -1 endi if $data20 != @21-10-20 10:00:03.000@ then return -1 endi if $data21 != 3 then return -1 endi if $data22 != @21-10-20 10:00:03.000@ then return -1 endi if $data30 != @21-10-20 10:00:06.000@ then return -1 endi if $data31 != 6 then return -1 endi if $data32 != @21-10-20 10:00:06.000@ then return -1 endi if $data40 != @21-10-20 10:00:10.000@ then return -1 endi if $data41 != 10 then return -1 endi if $data42 != @21-10-20 10:00:10.000@ then return -1 endi if $data50 != @21-10-20 10:00:15.000@ then return -1 endi if $data51 != 15 then return -1 endi if $data52 != @21-10-20 10:00:15.000@ then return -1 endi if $data60 != @21-10-20 10:00:21.000@ then return -1 endi if $data61 != 21 then return -1 endi if $data62 != @21-10-20 10:00:21.000@ then return -1 endi sql SELECT INTERP(c1) FROM stb1 every(1s) group by tbname; if $rows != 21 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data02 != tb1 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data12 != tb1 then return -1 endi if $data20 != @21-10-20 10:00:03.000@ then return -1 endi if $data21 != 3 then return -1 endi if $data22 != tb1 then return -1 endi if $data30 != @21-10-20 10:00:06.000@ then return -1 endi if $data31 != 6 then return -1 endi if $data32 != tb1 then return -1 endi if $data40 != @21-10-20 10:00:10.000@ then return -1 endi if $data41 != 10 then return -1 endi if $data42 != tb1 then return -1 endi if $data50 != @21-10-20 10:00:15.000@ then return -1 endi if $data51 != 15 then return -1 endi if $data52 != tb1 then return -1 endi if $data60 != @21-10-20 10:00:21.000@ then return -1 endi if $data61 != 21 then return -1 endi if $data62 != tb1 then return -1 endi if $data70 != @21-10-20 10:00:00.000@ then return -1 endi if $data71 != 0 then return -1 endi if $data72 != tb2 then return -1 endi if $data80 != @21-10-20 10:00:02.000@ then return -1 endi if $data81 != 2 then return -1 endi if $data82 != tb2 then return -1 endi if $data90 != @21-10-20 10:00:04.000@ then return -1 endi if $data91 != 4 then return -1 endi if $data92 != tb2 then return -1 endi sql SELECT INTERP(c1) FROM stb1 every(1s) group by tbname limit 5; if $rows != 15 then return -1 endi sql SELECT INTERP(c1) FROM stb1 every(1s) group by tbname limit 3; if $rows != 9 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data02 != tb1 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data12 != tb1 then return -1 endi if $data20 != @21-10-20 10:00:03.000@ then return -1 endi if $data21 != 3 then return -1 endi if $data22 != tb1 then return -1 endi if $data30 != @21-10-20 10:00:00.000@ then return -1 endi if $data31 != 0 then return -1 endi if $data32 != tb2 then return -1 endi if $data40 != @21-10-20 10:00:02.000@ then return -1 endi if $data41 != 2 then return -1 endi if $data42 != tb2 then return -1 endi if $data50 != @21-10-20 10:00:04.000@ then return -1 endi if $data51 != 4 then return -1 endi if $data52 != tb2 then return -1 endi if $data60 != @21-10-20 10:00:00.000@ then return -1 endi if $data61 != 0 then return -1 endi if $data62 != tb3 then return -1 endi if $data70 != @21-10-20 10:00:01.000@ then return -1 endi if $data71 != 1 then return -1 endi if $data72 != tb3 then return -1 endi if $data80 != @21-10-20 10:00:02.000@ then return -1 endi if $data81 != 2 then return -1 endi if $data82 != tb3 then return -1 endi sql SELECT INTERP(c1) FROM stb1 every(1s) group by tbname limit 3 offset 6; if $rows != 3 then return -1 endi if $data00 != @21-10-20 10:00:21.000@ then return -1 endi if $data01 != 21 then return -1 endi if $data02 != tb1 then return -1 endi if $data10 != @21-10-20 10:00:14.000@ then return -1 endi if $data11 != 14 then return -1 endi if $data12 != tb2 then return -1 endi if $data20 != @21-10-20 10:00:21.000@ then return -1 endi if $data21 != 21 then return -1 endi if $data22 != tb3 then return -1 endi sql SELECT INTERP(c1),t1,interp(c2),t2,interp(c3) FROM stb1 every(1s) group by tbname; if $rows != 21 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data02 != 1 then return -1 endi if $data03 != 0.00000 then return -1 endi if $data04 != 1 then return -1 endi if $data05 != 0 then return -1 endi if $data06 != tb1 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data12 != 1 then return -1 endi if $data13 != 1.00000 then return -1 endi if $data14 != 1 then return -1 endi if $data15 != 1 then return -1 endi if $data16 != tb1 then return -1 endi if $data20 != @21-10-20 10:00:03.000@ then return -1 endi if $data21 != 3 then return -1 endi if $data22 != 1 then return -1 endi if $data23 != 3.00000 then return -1 endi if $data24 != 1 then return -1 endi if $data25 != 3 then return -1 endi if $data26 != tb1 then return -1 endi if $data30 != @21-10-20 10:00:06.000@ then return -1 endi if $data31 != 6 then return -1 endi if $data32 != 1 then return -1 endi if $data33 != 6.00000 then return -1 endi if $data34 != 1 then return -1 endi if $data35 != 6 then return -1 endi if $data36 != tb1 then return -1 endi if $data40 != @21-10-20 10:00:10.000@ then return -1 endi if $data41 != 10 then return -1 endi if $data42 != 1 then return -1 endi if $data43 != 10.00000 then return -1 endi if $data44 != 1 then return -1 endi if $data45 != 10 then return -1 endi if $data46 != tb1 then return -1 endi if $data50 != @21-10-20 10:00:15.000@ then return -1 endi if $data51 != 15 then return -1 endi if $data52 != 1 then return -1 endi if $data53 != 15.00000 then return -1 endi if $data54 != 1 then return -1 endi if $data55 != 15 then return -1 endi if $data56 != tb1 then return -1 endi if $data60 != @21-10-20 10:00:21.000@ then return -1 endi if $data61 != 21 then return -1 endi if $data62 != 1 then return -1 endi if $data63 != 21.00000 then return -1 endi if $data64 != 1 then return -1 endi if $data65 != 21 then return -1 endi if $data66 != tb1 then return -1 endi if $data70 != @21-10-20 10:00:00.000@ then return -1 endi if $data71 != 0 then return -1 endi if $data72 != 2 then return -1 endi if $data73 != 0.00000 then return -1 endi if $data74 != 2 then return -1 endi if $data75 != 0 then return -1 endi if $data76 != tb2 then return -1 endi if $data80 != @21-10-20 10:00:02.000@ then return -1 endi if $data81 != 2 then return -1 endi if $data82 != 2 then return -1 endi if $data83 != 2.00000 then return -1 endi if $data84 != 2 then return -1 endi if $data85 != 2 then return -1 endi if $data86 != tb2 then return -1 endi if $data90 != @21-10-20 10:00:04.000@ then return -1 endi if $data91 != 4 then return -1 endi if $data92 != 2 then return -1 endi if $data93 != 4.00000 then return -1 endi if $data94 != 2 then return -1 endi if $data95 != 4 then return -1 endi if $data96 != tb2 then return -1 endi sql SELECT tbname,INTERP(c1),t1,interp(c2),t2,interp(c3) FROM stb1 every(4s) group by tbname; if $rows != 5 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != tb1 then return -1 endi if $data02 != 0 then return -1 endi if $data03 != 1 then return -1 endi if $data04 != 0.00000 then return -1 endi if $data05 != 1 then return -1 endi if $data06 != 0 then return -1 endi if $data07 != tb1 then return -1 endi if $data10 != @21-10-20 10:00:00.000@ then return -1 endi if $data11 != tb2 then return -1 endi if $data12 != 0 then return -1 endi if $data13 != 2 then return -1 endi if $data14 != 0.00000 then return -1 endi if $data15 != 2 then return -1 endi if $data16 != 0 then return -1 endi if $data17 != tb2 then return -1 endi if $data20 != @21-10-20 10:00:04.000@ then return -1 endi if $data21 != tb2 then return -1 endi if $data22 != 4 then return -1 endi if $data23 != 2 then return -1 endi if $data24 != 4.00000 then return -1 endi if $data25 != 2 then return -1 endi if $data26 != 4 then return -1 endi if $data27 != tb2 then return -1 endi if $data30 != @21-10-20 10:00:12.000@ then return -1 endi if $data31 != tb2 then return -1 endi if $data32 != 12 then return -1 endi if $data33 != 2 then return -1 endi if $data34 != 12.00000 then return -1 endi if $data35 != 2 then return -1 endi if $data36 != 12 then return -1 endi if $data37 != tb2 then return -1 endi if $data40 != @21-10-20 10:00:00.000@ then return -1 endi if $data41 != tb3 then return -1 endi if $data42 != 0 then return -1 endi if $data43 != 3 then return -1 endi if $data44 != 0.00000 then return -1 endi if $data45 != 3 then return -1 endi if $data46 != 0 then return -1 endi if $data47 != tb3 then return -1 endi sql SELECT INTERP(c1) FROM stb1 range('2021-10-20 10:00:00.000','2021-10-20 10:00:40.000') every(1s) fill(linear) group by tbname; if $rows != 59 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data02 != tb1 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data12 != tb1 then return -1 endi if $data20 != @21-10-20 10:00:02.000@ then return -1 endi if $data21 != 2 then return -1 endi if $data22 != tb1 then return -1 endi if $data30 != @21-10-20 10:00:03.000@ then return -1 endi if $data31 != 3 then return -1 endi if $data32 != tb1 then return -1 endi if $data40 != @21-10-20 10:00:04.000@ then return -1 endi if $data41 != 4 then return -1 endi if $data42 != tb1 then return -1 endi if $data50 != @21-10-20 10:00:05.000@ then return -1 endi if $data51 != 5 then return -1 endi if $data52 != tb1 then return -1 endi if $data60 != @21-10-20 10:00:06.000@ then return -1 endi if $data61 != 6 then return -1 endi if $data62 != tb1 then return -1 endi if $data70 != @21-10-20 10:00:07.000@ then return -1 endi if $data71 != 7 then return -1 endi if $data72 != tb1 then return -1 endi if $data80 != @21-10-20 10:00:08.000@ then return -1 endi if $data81 != 8 then return -1 endi if $data82 != tb1 then return -1 endi if $data90 != @21-10-20 10:00:09.000@ then return -1 endi if $data91 != 9 then return -1 endi if $data92 != tb1 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 14:00:00'); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 09:00:01') if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:00','2021-10-20 14:00:00'); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:04','2021-10-20 14:00:00') if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 11:00:00','2021-10-20 14:00:00'); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 FILL(LINEAR); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 FILL(NEXT); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 FILL(PREV); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 FILL(VALUE, 100); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 FILL(NULL); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 every(1s); if $rows != 7 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data20 != @21-10-20 10:00:03.000@ then return -1 endi if $data21 != 3 then return -1 endi if $data30 != @21-10-20 10:00:06.000@ then return -1 endi if $data31 != 6 then return -1 endi if $data40 != @21-10-20 10:00:10.000@ then return -1 endi if $data41 != 10 then return -1 endi if $data50 != @21-10-20 10:00:15.000@ then return -1 endi if $data51 != 15 then return -1 endi if $data60 != @21-10-20 10:00:21.000@ then return -1 endi if $data61 != 21 then return -1 endi sql SELECT INTERP(c1) FROM tb1 every(2s); if $rows != 3 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:06.000@ then return -1 endi if $data11 != 6 then return -1 endi if $data20 != @21-10-20 10:00:10.000@ then return -1 endi if $data21 != 10 then return -1 endi sql SELECT INTERP(c1) FROM tb1 every(5s); if $rows != 3 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:10.000@ then return -1 endi if $data11 != 10 then return -1 endi if $data20 != @21-10-20 10:00:15.000@ then return -1 endi if $data21 != 15 then return -1 endi sql SELECT INTERP(c1) FROM tb1 every(100s); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 14:00:00') FILL(LINEAR); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 09:00:01') FILL(LINEAR); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:00','2021-10-20 10:00:00') FILL(LINEAR); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:04','2021-10-20 14:00:00') FILL(LINEAR); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:04.000@ then return -1 endi if $data01 != 4 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 11:00:00','2021-10-20 14:00:00') FILL(LINEAR); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 14:00:00') FILL(NEXT); if $rows != 1 then return -1 endi if $data00 != @21-10-20 09:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 09:00:01') FILL(NEXT); if $rows != 1 then return -1 endi if $data00 != @21-10-20 09:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:00','2021-10-20 12:00:00') FILL(NEXT); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:04','2021-10-20 14:00:00') FILL(NEXT); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:04.000@ then return -1 endi if $data01 != 6 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 11:00:00','2021-10-20 14:00:00') FILL(NEXT); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 14:00:00') FILL(PREV); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 09:00:01') FILL(PREV); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:00','2021-10-20 12:00:00') FILL(PREV); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:04','2021-10-20 14:00:00') FILL(PREV); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:04.000@ then return -1 endi if $data01 != 3 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 11:00:00','2021-10-20 14:00:00') FILL(PREV); if $rows != 1 then return -1 endi if $data00 != @21-10-20 11:00:00.000@ then return -1 endi if $data01 != 21 then return -1 endi sql SELECT INTERP(c2) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 14:00:00') FILL(VALUE,100); if $rows != 1 then return -1 endi if $data00 != @21-10-20 09:00:00.000@ then return -1 endi if $data01 != 100.00000 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 09:00:01') FILL(VALUE,100); if $rows != 1 then return -1 endi if $data00 != @21-10-20 09:00:00.000@ then return -1 endi if $data01 != 100 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:00','2021-10-20 12:00:00') FILL(VALUE,100); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:04','2021-10-20 14:00:00') FILL(VALUE,100); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:04.000@ then return -1 endi if $data01 != 100 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 11:00:00','2021-10-20 14:00:00') FILL(VALUE,100); if $rows != 1 then return -1 endi if $data00 != @21-10-20 11:00:00.000@ then return -1 endi if $data01 != 100 then return -1 endi sql SELECT INTERP(c2) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 14:00:00') FILL(NULL); if $rows != 1 then return -1 endi if $data00 != @21-10-20 09:00:00.000@ then return -1 endi if $data01 != NULL then return -1 endi sql SELECT INTERP(c2) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 09:00:01') FILL(NULL); if $rows != 1 then return -1 endi if $data00 != @21-10-20 09:00:00.000@ then return -1 endi if $data01 != NULL then return -1 endi sql SELECT INTERP(c2) FROM tb1 RANGE('2021-10-20 10:00:00','2021-10-20 12:00:00') FILL(NULL); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0.00000 then return -1 endi sql SELECT INTERP(c2) FROM tb1 RANGE('2021-10-20 10:00:04','2021-10-20 14:00:00') FILL(NULL); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:04.000@ then return -1 endi if $data01 != NULL then return -1 endi sql SELECT INTERP(c2) FROM tb1 RANGE('2021-10-20 11:00:00','2021-10-20 14:00:00') FILL(NULL); if $rows != 1 then return -1 endi if $data00 != @21-10-20 11:00:00.000@ then return -1 endi if $data01 != NULL then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 14:00:00') EVERY(1s); if $rows != 7 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data20 != @21-10-20 10:00:03.000@ then return -1 endi if $data21 != 3 then return -1 endi if $data30 != @21-10-20 10:00:06.000@ then return -1 endi if $data31 != 6 then return -1 endi if $data40 != @21-10-20 10:00:10.000@ then return -1 endi if $data41 != 10 then return -1 endi if $data50 != @21-10-20 10:00:15.000@ then return -1 endi if $data51 != 15 then return -1 endi if $data60 != @21-10-20 10:00:21.000@ then return -1 endi if $data61 != 21 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 09:00:01') EVERY(1s); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:00','2021-10-20 10:00:00') EVERY(1s); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:04','2021-10-20 14:00:00') EVERY(1s); if $rows != 4 then return -1 endi if $data00 != @21-10-20 10:00:06.000@ then return -1 endi if $data01 != 6 then return -1 endi if $data10 != @21-10-20 10:00:10.000@ then return -1 endi if $data11 != 10 then return -1 endi if $data20 != @21-10-20 10:00:15.000@ then return -1 endi if $data21 != 15 then return -1 endi if $data30 != @21-10-20 10:00:21.000@ then return -1 endi if $data31 != 21 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 11:00:00','2021-10-20 14:00:00') EVERY(1s); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 14:00:00') EVERY(2s); if $rows != 3 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:06.000@ then return -1 endi if $data11 != 6 then return -1 endi if $data20 != @21-10-20 10:00:10.000@ then return -1 endi if $data21 != 10 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 09:00:00','2021-10-20 09:00:01') EVERY(2s); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:00','2021-10-20 10:00:00') EVERY(2s); if $rows != 1 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 10:00:04','2021-10-20 14:00:00') EVERY(2s); if $rows != 2 then return -1 endi if $data00 != @21-10-20 10:00:06.000@ then return -1 endi if $data01 != 6 then return -1 endi if $data10 != @21-10-20 10:00:10.000@ then return -1 endi if $data11 != 10 then return -1 endi sql SELECT INTERP(c1) FROM tb1 RANGE('2021-10-20 11:00:00','2021-10-20 14:00:00') EVERY(2s); if $rows != 0 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(1s) FILL(LINEAR); if $rows != 22 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data20 != @21-10-20 10:00:02.000@ then return -1 endi if $data21 != 2 then return -1 endi if $data80 != @21-10-20 10:00:08.000@ then return -1 endi if $data81 != 8 then return -1 endi if $data90 != @21-10-20 10:00:09.000@ then return -1 endi if $data91 != 9 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(1s) FILL(NEXT); if $rows != 22 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data20 != @21-10-20 10:00:02.000@ then return -1 endi if $data21 != 3 then return -1 endi if $data30 != @21-10-20 10:00:03.000@ then return -1 endi if $data31 != 3 then return -1 endi if $data40 != @21-10-20 10:00:04.000@ then return -1 endi if $data41 != 6 then return -1 endi if $data50 != @21-10-20 10:00:05.000@ then return -1 endi if $data51 != 6 then return -1 endi if $data60 != @21-10-20 10:00:06.000@ then return -1 endi if $data61 != 6 then return -1 endi if $data70 != @21-10-20 10:00:07.000@ then return -1 endi if $data71 != 10 then return -1 endi if $data80 != @21-10-20 10:00:08.000@ then return -1 endi if $data81 != 10 then return -1 endi if $data90 != @21-10-20 10:00:09.000@ then return -1 endi if $data91 != 10 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(1s) FILL(NEXT) limit 10 offset 10; if $rows != 10 then return -1 endi if $data00 != @21-10-20 10:00:10.000@ then return -1 endi if $data01 != 10 then return -1 endi if $data10 != @21-10-20 10:00:11.000@ then return -1 endi if $data11 != 15 then return -1 endi if $data20 != @21-10-20 10:00:12.000@ then return -1 endi if $data21 != 15 then return -1 endi if $data30 != @21-10-20 10:00:13.000@ then return -1 endi if $data31 != 15 then return -1 endi if $data40 != @21-10-20 10:00:14.000@ then return -1 endi if $data41 != 15 then return -1 endi if $data50 != @21-10-20 10:00:15.000@ then return -1 endi if $data51 != 15 then return -1 endi if $data60 != @21-10-20 10:00:16.000@ then return -1 endi if $data61 != 21 then return -1 endi if $data70 != @21-10-20 10:00:17.000@ then return -1 endi if $data71 != 21 then return -1 endi if $data80 != @21-10-20 10:00:18.000@ then return -1 endi if $data81 != 21 then return -1 endi if $data90 != @21-10-20 10:00:19.000@ then return -1 endi if $data91 != 21 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(1s) FILL(PREV); if $rows != 22 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data20 != @21-10-20 10:00:02.000@ then return -1 endi if $data21 != 1 then return -1 endi if $data30 != @21-10-20 10:00:03.000@ then return -1 endi if $data31 != 3 then return -1 endi if $data40 != @21-10-20 10:00:04.000@ then return -1 endi if $data41 != 3 then return -1 endi if $data50 != @21-10-20 10:00:05.000@ then return -1 endi if $data51 != 3 then return -1 endi if $data60 != @21-10-20 10:00:06.000@ then return -1 endi if $data61 != 6 then return -1 endi if $data70 != @21-10-20 10:00:07.000@ then return -1 endi if $data71 != 6 then return -1 endi if $data80 != @21-10-20 10:00:08.000@ then return -1 endi if $data81 != 6 then return -1 endi if $data90 != @21-10-20 10:00:09.000@ then return -1 endi if $data91 != 6 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(1s) FILL(PREV) limit 10 offset 10; if $rows != 10 then return -1 endi if $data00 != @21-10-20 10:00:10.000@ then return -1 endi if $data01 != 10 then return -1 endi if $data10 != @21-10-20 10:00:11.000@ then return -1 endi if $data11 != 10 then return -1 endi if $data20 != @21-10-20 10:00:12.000@ then return -1 endi if $data21 != 10 then return -1 endi if $data30 != @21-10-20 10:00:13.000@ then return -1 endi if $data31 != 10 then return -1 endi if $data40 != @21-10-20 10:00:14.000@ then return -1 endi if $data41 != 10 then return -1 endi if $data50 != @21-10-20 10:00:15.000@ then return -1 endi if $data51 != 15 then return -1 endi if $data60 != @21-10-20 10:00:16.000@ then return -1 endi if $data61 != 15 then return -1 endi if $data70 != @21-10-20 10:00:17.000@ then return -1 endi if $data71 != 15 then return -1 endi if $data80 != @21-10-20 10:00:18.000@ then return -1 endi if $data81 != 15 then return -1 endi if $data90 != @21-10-20 10:00:19.000@ then return -1 endi if $data91 != 15 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(1s) FILL(PREV) limit 10 offset 20; if $rows != 2 then return -1 endi if $data00 != @21-10-20 10:00:20.000@ then return -1 endi if $data01 != 15 then return -1 endi if $data10 != @21-10-20 10:00:21.000@ then return -1 endi if $data11 != 21 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(1s) FILL(VALUE,100); if $rows != 22 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data20 != @21-10-20 10:00:02.000@ then return -1 endi if $data21 != 100 then return -1 endi if $data30 != @21-10-20 10:00:03.000@ then return -1 endi if $data31 != 3 then return -1 endi if $data40 != @21-10-20 10:00:04.000@ then return -1 endi if $data41 != 100 then return -1 endi if $data50 != @21-10-20 10:00:05.000@ then return -1 endi if $data51 != 100 then return -1 endi if $data60 != @21-10-20 10:00:06.000@ then return -1 endi if $data61 != 6 then return -1 endi if $data70 != @21-10-20 10:00:07.000@ then return -1 endi if $data71 != 100 then return -1 endi if $data80 != @21-10-20 10:00:08.000@ then return -1 endi if $data81 != 100 then return -1 endi if $data90 != @21-10-20 10:00:09.000@ then return -1 endi if $data91 != 100 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(1s) FILL(NULL); if $rows != 22 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:01.000@ then return -1 endi if $data11 != 1 then return -1 endi if $data20 != @21-10-20 10:00:02.000@ then return -1 endi if $data21 != NULL then return -1 endi if $data30 != @21-10-20 10:00:03.000@ then return -1 endi if $data31 != 3 then return -1 endi if $data40 != @21-10-20 10:00:04.000@ then return -1 endi if $data41 != NULL then return -1 endi if $data50 != @21-10-20 10:00:05.000@ then return -1 endi if $data51 != NULL then return -1 endi if $data60 != @21-10-20 10:00:06.000@ then return -1 endi if $data61 != 6 then return -1 endi if $data70 != @21-10-20 10:00:07.000@ then return -1 endi if $data71 != NULL then return -1 endi if $data80 != @21-10-20 10:00:08.000@ then return -1 endi if $data81 != NULL then return -1 endi if $data90 != @21-10-20 10:00:09.000@ then return -1 endi if $data91 != NULL then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(5s) FILL(LINEAR); if $rows != 5 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:05.000@ then return -1 endi if $data11 != 5 then return -1 endi if $data20 != @21-10-20 10:00:10.000@ then return -1 endi if $data21 != 10 then return -1 endi if $data30 != @21-10-20 10:00:15.000@ then return -1 endi if $data31 != 15 then return -1 endi if $data40 != @21-10-20 10:00:20.000@ then return -1 endi if $data41 != 20 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(5s) FILL(NEXT); if $rows != 5 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:05.000@ then return -1 endi if $data11 != 6 then return -1 endi if $data20 != @21-10-20 10:00:10.000@ then return -1 endi if $data21 != 10 then return -1 endi if $data30 != @21-10-20 10:00:15.000@ then return -1 endi if $data31 != 15 then return -1 endi if $data40 != @21-10-20 10:00:20.000@ then return -1 endi if $data41 != 21 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(5s) FILL(PREV); if $rows != 5 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:05.000@ then return -1 endi if $data11 != 3 then return -1 endi if $data20 != @21-10-20 10:00:10.000@ then return -1 endi if $data21 != 10 then return -1 endi if $data30 != @21-10-20 10:00:15.000@ then return -1 endi if $data31 != 15 then return -1 endi if $data40 != @21-10-20 10:00:20.000@ then return -1 endi if $data41 != 15 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(5s) FILL(VALUE,100); if $rows != 5 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:05.000@ then return -1 endi if $data11 != 100 then return -1 endi if $data20 != @21-10-20 10:00:10.000@ then return -1 endi if $data21 != 10 then return -1 endi if $data30 != @21-10-20 10:00:15.000@ then return -1 endi if $data31 != 15 then return -1 endi if $data40 != @21-10-20 10:00:20.000@ then return -1 endi if $data41 != 100 then return -1 endi sql SELECT INTERP(c1) FROM tb1 EVERY(5s) FILL(NULL); if $rows != 5 then return -1 endi if $data00 != @21-10-20 10:00:00.000@ then return -1 endi if $data01 != 0 then return -1 endi if $data10 != @21-10-20 10:00:05.000@ then return -1 endi if $data11 != NULL then return -1 endi if $data20 != @21-10-20 10:00:10.000@ then return -1 endi if $data21 != 10 then return -1 endi if $data30 != @21-10-20 10:00:15.000@ then return -1 endi if $data31 != 15 then return -1 endi if $data40 != @21-10-20 10:00:20.000@ then return -1 endi if $data41 != NULL then return -1 endi