From 0a2201a96c5089b6f9fd3e45a495e1f2a8a04a12 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 7 Dec 2021 17:24:08 +0800 Subject: [PATCH] add test case --- tests/pytest/stable/json_tag.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/pytest/stable/json_tag.py b/tests/pytest/stable/json_tag.py index e914765fd3..cc59221b3b 100644 --- a/tests/pytest/stable/json_tag.py +++ b/tests/pytest/stable/json_tag.py @@ -374,6 +374,15 @@ class TDTestCase: cname_list.append("jsons1.jtag->'tag1'") tdSql.checkColNameList(res, cname_list) + # test top/bottom with group by json tag + tdSql.query("select top(dataint,100) from jsons1 group by jtag->'tag1'") + tdSql.checkRows(11) + tdSql.checkData(0, 1, 4) + tdSql.checkData(1, 1, 24) + tdSql.checkData(1, 2, None) + tdSql.checkData(10, 1, 1) + tdSql.checkData(10, 2, '"femail"') + # subquery with json tag tdSql.query("select * from (select jtag, dataint from jsons1)") -- GitLab