[TD-6046]<fix> fix ts top/bottom error
This commit is contained in:
parent
2798480b00
commit
045f873636
|
@ -63,6 +63,16 @@ class TDTestCase:
|
||||||
tdSql.checkData(3, 1, "2018-09-17 09:01:20.000")
|
tdSql.checkData(3, 1, "2018-09-17 09:01:20.000")
|
||||||
tdSql.checkData(3, 3, "2018-09-17 09:01:20.000")
|
tdSql.checkData(3, 3, "2018-09-17 09:01:20.000")
|
||||||
|
|
||||||
|
tdSql.query("select ts,derivative(col1, 10, 1),ts from tb1")
|
||||||
|
tdSql.checkRows(2)
|
||||||
|
tdSql.checkData(0, 0, "2018-09-17 09:00:10.000")
|
||||||
|
tdSql.checkData(0, 1, "2018-09-17 09:00:10.000")
|
||||||
|
tdSql.checkData(0, 3, "2018-09-17 09:00:10.000")
|
||||||
|
tdSql.checkData(1, 0, "2018-09-17 09:00:20.009")
|
||||||
|
tdSql.checkData(1, 1, "2018-09-17 09:00:20.009")
|
||||||
|
tdSql.checkData(1, 3, "2018-09-17 09:00:20.009")
|
||||||
|
|
||||||
|
|
||||||
tdSql.query("select ts from(select ts,derivative(col, 10s, 0) from stb group by tbname)")
|
tdSql.query("select ts from(select ts,derivative(col, 10s, 0) from stb group by tbname)")
|
||||||
|
|
||||||
tdSql.checkData(0, 0, "2018-09-17 09:00:10.000")
|
tdSql.checkData(0, 0, "2018-09-17 09:00:10.000")
|
||||||
|
|
|
@ -95,6 +95,24 @@ class TDTestCase:
|
||||||
tdSql.error("select diff(col14) from test")
|
tdSql.error("select diff(col14) from test")
|
||||||
|
|
||||||
|
|
||||||
|
tdSql.query("select ts,diff(col1),ts from test1")
|
||||||
|
tdSql.checkRows(10)
|
||||||
|
tdSql.checkData(0, 0, "2018-09-17 09:00:00.000")
|
||||||
|
tdSql.checkData(0, 1, "2018-09-17 09:00:00.000")
|
||||||
|
tdSql.checkData(0, 3, "2018-09-17 09:00:00.000")
|
||||||
|
tdSql.checkData(9, 0, "2018-09-17 09:00:00.009")
|
||||||
|
tdSql.checkData(9, 1, "2018-09-17 09:00:00.009")
|
||||||
|
tdSql.checkData(9, 3, "2018-09-17 09:00:00.009")
|
||||||
|
|
||||||
|
tdSql.query("select ts,diff(col1),ts from test group by tbname")
|
||||||
|
tdSql.checkRows(10)
|
||||||
|
tdSql.checkData(0, 0, "2018-09-17 09:00:00.000")
|
||||||
|
tdSql.checkData(0, 1, "2018-09-17 09:00:00.000")
|
||||||
|
tdSql.checkData(0, 3, "2018-09-17 09:00:00.000")
|
||||||
|
tdSql.checkData(9, 0, "2018-09-17 09:00:00.009")
|
||||||
|
tdSql.checkData(9, 1, "2018-09-17 09:00:00.009")
|
||||||
|
tdSql.checkData(9, 3, "2018-09-17 09:00:00.009")
|
||||||
|
|
||||||
tdSql.query("select diff(col1) from test1")
|
tdSql.query("select diff(col1) from test1")
|
||||||
tdSql.checkRows(10)
|
tdSql.checkRows(10)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue