From a3c98521f61534cce102aa1eb8a91b40865e8f6d Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 27 Dec 2021 15:37:58 +0800 Subject: [PATCH] [TD-11983](query): elapsed function second param time_unit should not contain now keyword --- tests/pytest/functions/function_derivative.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/pytest/functions/function_derivative.py b/tests/pytest/functions/function_derivative.py index a2a458ea29..3696dc2401 100644 --- a/tests/pytest/functions/function_derivative.py +++ b/tests/pytest/functions/function_derivative.py @@ -140,6 +140,9 @@ class TDTestCase: tdSql.error("select derivative(col, 1s, 1) 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, 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 group by col") @@ -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, -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, 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): tdSql.prepare() -- GitLab