提交 a3c98521 编写于 作者: G Ganlin Zhao

[TD-11983]<fix>(query): elapsed function second param time_unit should not contain now keyword

上级 2d775245
...@@ -140,6 +140,9 @@ class TDTestCase: ...@@ -140,6 +140,9 @@ class TDTestCase:
tdSql.error("select derivative(col, 1s, 1) from tb2") tdSql.error("select derivative(col, 1s, 1) from tb2")
tdSql.error("select derivative(col, 10s, 0) from tb2") tdSql.error("select derivative(col, 10s, 0) from tb2")
tdSql.error("select derivative(col, 999ms, 0) from tb2") tdSql.error("select derivative(col, 999ms, 0) from tb2")
tdSql.error("select derivative(col, now, 0) from tb2") #TD-11983 now not allowed in second param
tdSql.error("select derivative(col, now+3d-8h+6m, 0) from tb2") #TD-11983 now not allowed in second param
tdSql.error("select derivative(col, 3d-8h+now+6m, 0) from tb2") #TD-11983 now not allowed in second param
tdSql.error("select derivative(col, 10s, 1) from stb") tdSql.error("select derivative(col, 10s, 1) from stb")
tdSql.error("select derivative(col, 10s, 1) from stb group by col") tdSql.error("select derivative(col, 10s, 1) from stb group by col")
...@@ -150,6 +153,9 @@ class TDTestCase: ...@@ -150,6 +153,9 @@ class TDTestCase:
tdSql.error("select derivative(col, 10y, 0) from stb group by tbname") #TD-10399, DB error: syntax error near '10y, 0) from stb group by tbname;' tdSql.error("select derivative(col, 10y, 0) from stb group by tbname") #TD-10399, DB error: syntax error near '10y, 0) from stb group by tbname;'
tdSql.error("select derivative(col, -106752d, 0) from stb group by tbname") #TD-10398 overflow tips tdSql.error("select derivative(col, -106752d, 0) from stb group by tbname") #TD-10398 overflow tips
tdSql.error("select derivative(col, 106751991168d, 0) from stb group by tbname") #TD-10398 overflow tips tdSql.error("select derivative(col, 106751991168d, 0) from stb group by tbname") #TD-10398 overflow tips
tdSql.error("select derivative(col, now, 1) from stb") #TD-11983 now not allowed in second param
tdSql.error("select derivative(col, now+3d-8h+6m, 1) from stb") #TD-11983 now not allowed in second param
tdSql.error("select derivative(col, 3d-8h+now+6m, 1) from stb") #TD-11983 now not allowed in second param
def run(self): def run(self):
tdSql.prepare() tdSql.prepare()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册