未验证 提交 f894595b 编写于 作者: H Hui Li 提交者: GitHub

Merge pull request #8262 from taosdata/xiaoping/add_test_case

[TS-444]<test>: add test case for union all
文件模式从 100644 更改为 100755
...@@ -24,7 +24,7 @@ class TDTestCase: ...@@ -24,7 +24,7 @@ class TDTestCase:
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)
self.ts = 1500000000000 self.ts = 1600000000000
self.num = 10 self.num = 10
def run(self): def run(self):
...@@ -84,6 +84,26 @@ class TDTestCase: ...@@ -84,6 +84,26 @@ class TDTestCase:
tdSql.query("select 'dcs' as options from stb where col > 200 limit 1 union all select 'aaa' as options from stb limit 10") tdSql.query("select 'dcs' as options from stb where col > 200 limit 1 union all select 'aaa' as options from stb limit 10")
tdSql.checkData(0, 0, 'aaa') tdSql.checkData(0, 0, 'aaa')
# https://jira.taosdata.com:18080/browse/TS-444
tdLog.info("test case for TS-444")
tdSql.query("select count(*) as count, loc from st where ts between 1600000000000 and 1600000000010 group by loc")
tdSql.checkRows(6)
tdSql.query("select count(*) as count, loc from st where ts between 1600000000020 and 1600000000030 group by loc")
tdSql.checkRows(0)
tdSql.query(''' select count(*) as count, loc from st where ts between 1600000000000 and 1600000000010 group by loc
union all
select count(*) as count, loc from st where ts between 1600000000020 and 1600000000030 group by loc''')
tdSql.checkRows(6)
tdSql.query(''' select count(*) as count, loc from st where ts between 1600000000020 and 1600000000030 group by loc
union all
select count(*) as count, loc from st where ts between 1600000000000 and 1600000000010 group by loc''')
tdSql.checkRows(6)
def stop(self): def stop(self):
tdSql.close() tdSql.close()
tdLog.success("%s successfully executed" % __file__) tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册