From 76b0df9a286628ed28d7d26536f6754665e42304 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 1 Dec 2021 14:59:30 +0800 Subject: [PATCH] enable different value type of the same key in json --- tests/pytest/stable/json_tag.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/pytest/stable/json_tag.py b/tests/pytest/stable/json_tag.py index 5d551e107b..198775b6e7 100644 --- a/tests/pytest/stable/json_tag.py +++ b/tests/pytest/stable/json_tag.py @@ -113,6 +113,9 @@ class TDTestCase: tdSql.query("select *,tbname from db_json_tag_test.jsons1 where jtag->'num'=5 or jtag?'sex'") tdSql.checkRows(2) + tdSql.query("select *,tbname from db_json_tag_test.jsons1 where jtag->'num'=5") + tdSql.checkRows(1) + # test with tbname tdSql.query("select * from db_json_tag_test.jsons1 where tbname = 'jsons1_1'") tdSql.checkRows(1) @@ -147,7 +150,6 @@ class TDTestCase: # test where condition in tdSql.error("select * from db_json_tag_test.jsons1 where jtag->'location' in ('beijing')") - tdSql.error("select * from db_json_tag_test.jsons1 where jtag->'num' in ('5',34)") # test where condition match @@ -214,7 +216,8 @@ class TDTestCase: tdSql.query("select * from db_json_tag_test.jsons1 where jtag->'location'='null'") tdSql.checkRows(0) - tdSql.error("select * from db_json_tag_test.jsons1 where jtag->'num'='null'") + tdSql.query("select * from db_json_tag_test.jsons1 where jtag->'num'='null'") + tdSql.checkRows(0) # test distinct tdSql.query("select distinct jtag from db_json_tag_test.jsons1") -- GitLab