From 859eb12d8f593d03fe19551b6f281ab3f88ba22d Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 21 Dec 2021 17:45:59 +0800 Subject: [PATCH] add test case --- tests/pytest/functions/function_elapsed_case.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pytest/functions/function_elapsed_case.py b/tests/pytest/functions/function_elapsed_case.py index 4efbc6b901..50fbb0fe32 100644 --- a/tests/pytest/functions/function_elapsed_case.py +++ b/tests/pytest/functions/function_elapsed_case.py @@ -223,8 +223,8 @@ class ElapsedCase: self.orderbyForStableCheck("select elapsed(ts) from st1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00' interval(1000m) group by tbname", 1, 2) #nested query - resAsc = tdSql.getResult("select elapsed(ts) from (select * from t1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00')") - resDesc = tdSql.getResult("select elapsed(ts) from (select * from t1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00' order by ts desc)") + resAsc = tdSql.getResult("select elapsed(ts) from (select csum(i) from t1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00')") + resDesc = tdSql.getResult("select elapsed(ts) from (select csum(i) from t1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00' order by ts desc)") resRows = len(resAsc) for i in range(resRows): tdSql.checkEqual(resAsc[i][0], resDesc[resRows - i - 1][0]) -- GitLab