From 888b8ec13c9384fe6f6f0e664afaf84e380978d8 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Fri, 8 Jan 2021 14:38:37 +0800 Subject: [PATCH] [TD-2627] add case for apercentile --- tests/pytest/functions/function_percentile.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/pytest/functions/function_percentile.py b/tests/pytest/functions/function_percentile.py index e63d65f2e6..9095b6672b 100644 --- a/tests/pytest/functions/function_percentile.py +++ b/tests/pytest/functions/function_percentile.py @@ -142,6 +142,15 @@ class TDTestCase: tdSql.error("select percentile(voltage, 20) from meters") tdSql.query("select apercentile(voltage, 20) from meters") print("apercentile result: %s" % tdSql.getData(0, 0)) + + # Test case for: https://jira.taosdata.com:18080/browse/TD-2609 + # modified for : https://jira.taosdata.com:18080/browse/TD-2627 + tdSql.execute("create table st(ts timestamp, k int)") + tdSql.execute("insert into st values(now, -100)(now+1a,-99)") + tdSql.query("select apercentile(k, 20) from st") + tdSql.checkData(0, 0, -100.00) + + def stop(self): tdSql.close() -- GitLab