From 4064b06378a8f76829bee1d0a0e277c0f21c2ae6 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 9 Nov 2021 20:27:10 +0800 Subject: [PATCH] add json compare function support --- tests/pytest/stable/json_tag.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/pytest/stable/json_tag.py b/tests/pytest/stable/json_tag.py index fd9f8b1013..cf6573d343 100644 --- a/tests/pytest/stable/json_tag.py +++ b/tests/pytest/stable/json_tag.py @@ -279,7 +279,10 @@ class TDTestCase: tdSql.execute("INSERT INTO db_json_tag_test.jsons1_21 using db_json_tag_test.jsons1 tags('{\"tagint\":11}') values(now, 11, false, \"你就会\")") tdSql.execute("INSERT INTO db_json_tag_test.jsons1_22 using db_json_tag_test.jsons1 tags('{\"tagint\":2}') values(now, 2, false, \"你就会\")") tdSql.query("select avg(dataint),count(*) from db_json_tag_test.jsons1 group by jtag->'tagint' order by jtag->'tagint' desc") - #tdSql.checkData(1, 0, 2.5) + tdSql.checkData(0, 0, 11) + tdSql.checkData(0, 2, 11) + tdSql.checkData(1, 2, 2) + tdSql.checkData(3, 2, None) # test json->'key'=null tdSql.execute("insert into db_json_tag_test.jsons1_9 values('2020-04-17 15:20:00.000', 5, false, 'json19')") -- GitLab