提交 76b0df9a 编写于 作者: wmmhello's avatar wmmhello

enable different value type of the same key in json

上级 222286c5
...@@ -113,6 +113,9 @@ class TDTestCase: ...@@ -113,6 +113,9 @@ class TDTestCase:
tdSql.query("select *,tbname from db_json_tag_test.jsons1 where jtag->'num'=5 or jtag?'sex'") tdSql.query("select *,tbname from db_json_tag_test.jsons1 where jtag->'num'=5 or jtag?'sex'")
tdSql.checkRows(2) tdSql.checkRows(2)
tdSql.query("select *,tbname from db_json_tag_test.jsons1 where jtag->'num'=5")
tdSql.checkRows(1)
# test with tbname # test with tbname
tdSql.query("select * from db_json_tag_test.jsons1 where tbname = 'jsons1_1'") tdSql.query("select * from db_json_tag_test.jsons1 where tbname = 'jsons1_1'")
tdSql.checkRows(1) tdSql.checkRows(1)
...@@ -147,7 +150,6 @@ class TDTestCase: ...@@ -147,7 +150,6 @@ class TDTestCase:
# test where condition in # 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->'location' in ('beijing')")
tdSql.error("select * from db_json_tag_test.jsons1 where jtag->'num' in ('5',34)") tdSql.error("select * from db_json_tag_test.jsons1 where jtag->'num' in ('5',34)")
# test where condition match # test where condition match
...@@ -214,7 +216,8 @@ class TDTestCase: ...@@ -214,7 +216,8 @@ class TDTestCase:
tdSql.query("select * from db_json_tag_test.jsons1 where jtag->'location'='null'") tdSql.query("select * from db_json_tag_test.jsons1 where jtag->'location'='null'")
tdSql.checkRows(0) 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 # test distinct
tdSql.query("select distinct jtag from db_json_tag_test.jsons1") tdSql.query("select distinct jtag from db_json_tag_test.jsons1")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册