未验证 提交 939e5d41 编写于 作者: H huili 提交者: GitHub

Merge pull request #6033 from taosdata/xiaoping/test_case

[TD-4019]<test> add test case
......@@ -56,6 +56,24 @@ class TDTestCase:
tdSql.query(sql)
tdSql.checkRows(6)
tdSql.execute("create table stb(ts timestamp, options binary(7), city binary(10)) tags(type int)")
tdSql.execute("insert into tb1 using stb tags(1) values(%d, 'option1', 'beijing')" % self.ts)
tdSql.execute("insert into tb2 using stb tags(2) values(%d, 'option2', 'shanghai')" % self.ts)
tdSql.query("select options from stb where type = 1 limit 1 union all select options from stb where type = 2 limit 1")
tdSql.checkData(0, 0, "option1")
tdSql.checkData(1, 0, "option2")
tdSql.query("select 'dc' as options from stb where type = 1 limit 1 union all select 'ad' as options from stb where type = 2 limit 1")
tdSql.checkData(0, 0, "dc")
tdSql.checkData(1, 0, "ad")
tdSql.query("select 'dc' as options from stb where type = 1 limit 1 union all select 'adc' as options from stb where type = 2 limit 1")
tdSql.checkData(0, 0, "dc")
tdSql.checkData(1, 0, "adc")
tdSql.error("select 'dc' as options from stb where type = 1 limit 1 union all select 'ad' as city from stb where type = 2 limit 1")
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册