**Description**: The value that matches the specified timestamp range is returned, if existing; or an interpolation value is returned.
**Description**: The value that matches the specified timestamp range is returned, if existing; or an interpolation value is returned. The value of `ignore_null_values` can be 0 or 1, 1 means null values are ignored. The default value of this parameter is 0.
**Return value type**: Same as the column being operated upon
tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{tbname_null} where c0 is not null range('2020-02-02 00:00:01', '2020-02-02 00:00:11') every(1s) fill(NULL)")
tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname_null} where c0 is not null range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(NULL)")
tdSql.checkRows(9)
tdSql.checkData(0,1,False)
tdSql.checkData(1,1,True)
tdSql.checkData(2,1,True)
tdSql.checkData(3,1,True)
tdSql.checkData(4,1,False)
tdSql.checkData(5,1,True)
tdSql.checkData(6,1,False)
tdSql.checkData(7,1,False)
tdSql.checkData(8,1,True)
tdSql.checkData(0,2,1)
tdSql.checkData(1,2,None)
tdSql.checkData(2,2,None)
tdSql.checkData(3,2,None)
tdSql.checkData(4,2,9)
tdSql.checkData(5,2,None)
tdSql.checkData(6,2,13)
tdSql.checkData(7,2,15)
tdSql.checkData(8,2,None)
tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0, 1) from {dbname}.{stbname_null} partition by tbname range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(NULL)")
tdSql.checkRows(27)
foriinrange(0,9):
tdSql.checkData(i,0,'ctb1_null')
foriinrange(9,18):
tdSql.checkData(i,0,'ctb2_null')
foriinrange(18,27):
tdSql.checkData(i,0,'ctb3_null')
tdSql.checkData(0,1,'2020-02-01 00:00:01.000')
tdSql.checkData(8,1,'2020-02-01 00:00:17.000')
tdSql.checkData(9,1,'2020-02-01 00:00:01.000')
tdSql.checkData(17,1,'2020-02-01 00:00:17.000')
tdSql.checkData(18,1,'2020-02-01 00:00:01.000')
tdSql.checkData(26,1,'2020-02-01 00:00:17.000')
tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0) from {dbname}.{stbname_null} where c0 is not null partition by tbname range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(NULL)")
tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{tbname_null} where c0 is not null range('2020-02-02 00:00:01', '2020-02-02 00:00:11') every(1s) fill(value, 0)")
tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname_null} where c0 is not null range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(value, 0)")
tdSql.checkRows(9)
tdSql.checkData(0,1,False)
tdSql.checkData(1,1,True)
tdSql.checkData(2,1,True)
tdSql.checkData(3,1,True)
tdSql.checkData(4,1,False)
tdSql.checkData(5,1,True)
tdSql.checkData(6,1,False)
tdSql.checkData(7,1,False)
tdSql.checkData(8,1,True)
tdSql.checkData(0,2,1)
tdSql.checkData(1,2,0)
tdSql.checkData(2,2,0)
tdSql.checkData(3,2,0)
tdSql.checkData(4,2,9)
tdSql.checkData(5,2,0)
tdSql.checkData(6,2,13)
tdSql.checkData(7,2,15)
tdSql.checkData(8,2,0)
tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0, 1) from {dbname}.{stbname_null} partition by tbname range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(value, 0)")
tdSql.checkRows(27)
foriinrange(0,9):
tdSql.checkData(i,0,'ctb1_null')
foriinrange(9,18):
tdSql.checkData(i,0,'ctb2_null')
foriinrange(18,27):
tdSql.checkData(i,0,'ctb3_null')
tdSql.checkData(0,1,'2020-02-01 00:00:01.000')
tdSql.checkData(8,1,'2020-02-01 00:00:17.000')
tdSql.checkData(9,1,'2020-02-01 00:00:01.000')
tdSql.checkData(17,1,'2020-02-01 00:00:17.000')
tdSql.checkData(18,1,'2020-02-01 00:00:01.000')
tdSql.checkData(26,1,'2020-02-01 00:00:17.000')
tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0) from {dbname}.{stbname_null} where c0 is not null partition by tbname range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(value, 0)")
tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{tbname_null} where c0 is not null range('2020-02-02 00:00:01', '2020-02-02 00:00:11') every(1s) fill(prev)")
tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname_null} where c0 is not null range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(prev)")
tdSql.checkRows(9)
tdSql.checkData(0,1,False)
tdSql.checkData(1,1,True)
tdSql.checkData(2,1,True)
tdSql.checkData(3,1,True)
tdSql.checkData(4,1,False)
tdSql.checkData(5,1,True)
tdSql.checkData(6,1,False)
tdSql.checkData(7,1,False)
tdSql.checkData(8,1,True)
tdSql.checkData(0,2,1)
tdSql.checkData(1,2,1)
tdSql.checkData(2,2,1)
tdSql.checkData(3,2,1)
tdSql.checkData(4,2,9)
tdSql.checkData(5,2,9)
tdSql.checkData(6,2,13)
tdSql.checkData(7,2,15)
tdSql.checkData(8,2,15)
tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0, 1) from {dbname}.{stbname_null} partition by tbname range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(prev)")
tdSql.checkRows(14)
foriinrange(0,9):
tdSql.checkData(i,0,'ctb1_null')
foriinrange(9,13):
tdSql.checkData(i,0,'ctb2_null')
tdSql.checkData(0,1,'2020-02-01 00:00:01.000')
tdSql.checkData(8,1,'2020-02-01 00:00:17.000')
tdSql.checkData(9,1,'2020-02-01 00:00:09.000')
tdSql.checkData(13,1,'2020-02-01 00:00:17.000')
tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0) from {dbname}.{stbname_null} where c0 is not null partition by tbname range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(prev)")
tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{tbname_null} where c0 is not null range('2020-02-02 00:00:01', '2020-02-02 00:00:11') every(1s) fill(next)")
tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname_null} where c0 is not null range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(next)")
tdSql.checkRows(8)
tdSql.checkData(0,1,False)
tdSql.checkData(1,1,True)
tdSql.checkData(2,1,True)
tdSql.checkData(3,1,True)
tdSql.checkData(4,1,False)
tdSql.checkData(5,1,True)
tdSql.checkData(6,1,False)
tdSql.checkData(7,1,False)
tdSql.checkData(0,2,1)
tdSql.checkData(1,2,9)
tdSql.checkData(2,2,9)
tdSql.checkData(3,2,9)
tdSql.checkData(4,2,9)
tdSql.checkData(5,2,13)
tdSql.checkData(6,2,13)
tdSql.checkData(7,2,15)
tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0, 1) from {dbname}.{stbname_null} partition by tbname range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(next)")
tdSql.checkRows(15)
foriinrange(0,7):
tdSql.checkData(i,0,'ctb1_null')
foriinrange(7,15):
tdSql.checkData(i,0,'ctb2_null')
tdSql.checkData(0,1,'2020-02-01 00:00:01.000')
tdSql.checkData(6,1,'2020-02-01 00:00:13.000')
tdSql.checkData(7,1,'2020-02-01 00:00:01.000')
tdSql.checkData(14,1,'2020-02-01 00:00:15.000')
tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0) from {dbname}.{stbname_null} where c0 is not null partition by tbname range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(next)")
tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{tbname_null} where c0 is not null range('2020-02-02 00:00:01', '2020-02-02 00:00:11') every(1s) fill(linear)")
tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname_null} where c0 is not null range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(linear)")
tdSql.checkRows(8)
tdSql.checkData(0,1,False)
tdSql.checkData(1,1,True)
tdSql.checkData(2,1,True)
tdSql.checkData(3,1,True)
tdSql.checkData(4,1,False)
tdSql.checkData(5,1,True)
tdSql.checkData(6,1,False)
tdSql.checkData(7,1,False)
tdSql.checkData(0,2,1)
tdSql.checkData(1,2,3)
tdSql.checkData(2,2,5)
tdSql.checkData(3,2,7)
tdSql.checkData(4,2,9)
tdSql.checkData(5,2,11)
tdSql.checkData(6,2,13)
tdSql.checkData(7,2,15)
tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0, 1) from {dbname}.{stbname_null} partition by tbname range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(linear)")
tdSql.checkRows(11)
foriinrange(0,7):
tdSql.checkData(i,0,'ctb1_null')
foriinrange(7,11):
tdSql.checkData(i,0,'ctb2_null')
tdSql.checkData(0,1,'2020-02-01 00:00:01.000')
tdSql.checkData(6,1,'2020-02-01 00:00:13.000')
tdSql.checkData(7,1,'2020-02-01 00:00:09.000')
tdSql.checkData(10,1,'2020-02-01 00:00:15.000')
tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0) from {dbname}.{stbname_null} where c0 is not null partition by tbname range('2020-02-01 00:00:01', '2020-02-01 00:00:17') every(2s) fill(linear)")
tdSql.checkRows(11)
foriinrange(0,7):
tdSql.checkData(i,0,'ctb1_null')
foriinrange(7,11):
tdSql.checkData(i,0,'ctb2_null')
tdSql.checkData(0,1,'2020-02-01 00:00:01.000')
tdSql.checkData(6,1,'2020-02-01 00:00:13.000')
tdSql.checkData(7,1,'2020-02-01 00:00:09.000')
tdSql.checkData(10,1,'2020-02-01 00:00:15.000')
# multiple column with ignoring null value is not allowed