提交 7fc03779 编写于 作者: X Xiaoyu Wang

fix: result is incorrect in case of interval query with elapsed()

上级 7ae47dfb
......@@ -92,13 +92,6 @@ class TDTestCase:
tdSql.query('select elapsed(ts,10s) from sub_1 where ts>="2015-01-01 00:00:00.000" and ts < "2015-01-01 00:10:00.000" session(ts,1d) ;')
cfg_path = self.getcfgPath()
print(cfg_path)
tdSql.query('select elapsed(ts,10s) from st where ts>="2015-01-01 00:00:00.000" and ts < "2015-01-01 00:10:00.000" session(ts,1d) group by tbname;') # session not support super table
tdSql.checkRows(10)
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
......@@ -94,22 +94,22 @@ class TDTestCase:
cfg_path = self.getcfgPath()
print(cfg_path)
tdSql.execute('select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;')
tdSql.error('select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;')
datas = tdSql.getResult('select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;')
# datas = tdSql.getResult('select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;')
table_names = ["sub_%s"%str(i) for i in range(10)]
# print(table_names)
for index , table_name in enumerate(table_names):
tdSql.query("select elapsed(ts,10s) from testdb.%s where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) ;"%table_name)
# print(datas)
tdSql.checkData(0,1,datas[index][1])
# tdSql.checkData(0,1,datas[index][1])
for i in range(10):
taos_cmd1= "taos -c %s -s 'select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;' " % (cfg_path)
# for i in range(10):
# taos_cmd1= "taos -c %s -s 'select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;' " % (cfg_path)
# print(taos_cmd1)
_ = subprocess.check_output(taos_cmd1, shell=True).decode("utf-8")
# _ = subprocess.check_output(taos_cmd1, shell=True).decode("utf-8")
def stop(self):
tdSql.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册