未验证 提交 92ffa40b 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #6441 from taosdata/feature/m2d

Feature/m2d
......@@ -265,7 +265,7 @@ static int tscUpdateSubscription(STscObj* pObj, SSub* pSub) {
SSqlCmd* pCmd = &pSql->cmd;
pSub->lastSyncTime = taosGetTimestampMs();
TSDB_QUERY_CLEAR_TYPE(tscGetQueryInfo(pCmd)->type, TSDB_QUERY_TYPE_MULTITABLE_QUERY);
STableMetaInfo *pTableMetaInfo = tscGetTableMetaInfoFromCmd(pCmd, 0);
if (UTIL_TABLE_IS_NORMAL_TABLE(pTableMetaInfo)) {
......@@ -276,6 +276,8 @@ static int tscUpdateSubscription(STscObj* pObj, SSub* pSub) {
taosArrayClear(pSub->progress);
taosArrayPush(pSub->progress, &target);
}
pSub->lastSyncTime = taosGetTimestampMs();
return 1;
}
......@@ -305,7 +307,11 @@ static int tscUpdateSubscription(STscObj* pObj, SSub* pSub) {
}
taosArrayDestroy(tables);
TSDB_QUERY_SET_TYPE(tscGetQueryInfo(pCmd)->type, TSDB_QUERY_TYPE_MULTITABLE_QUERY);
if (pTableMetaInfo->pVgroupTables && taosArrayGetSize(pTableMetaInfo->pVgroupTables) > 0) {
TSDB_QUERY_SET_TYPE(tscGetQueryInfo(pCmd)->type, TSDB_QUERY_TYPE_MULTITABLE_QUERY);
}
pSub->lastSyncTime = taosGetTimestampMs();
return 1;
}
......
......@@ -3572,6 +3572,9 @@ int32_t tsdbGetTableGroupFromIdList(STsdbRepo* tsdb, SArray* pTableIdList, STabl
if (pTable->type == TSDB_SUPER_TABLE) {
tsdbError("direct query on super tale is not allowed, table uid:%"PRIu64", tid:%d", id->uid, id->tid);
terrno = TSDB_CODE_QRY_INVALID_MSG;
tsdbUnlockRepoMeta(tsdb);
taosArrayDestroy(group);
return terrno;
}
tsdbRefTable(pTable);
......
......@@ -265,6 +265,10 @@ static int32_t tKeywordCode(const char* z, int n) {
}
}
if (keywordHashTable == NULL) {
return TK_ILLEGAL;
}
SKeyword** pKey = (SKeyword**)taosHashGet(keywordHashTable, key, n);
return (pKey != NULL)? (*pKey)->type:TK_ID;
}
......
......@@ -60,14 +60,14 @@ class TDTestCase:
x = 0
while (x < rowNum):
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
# TSIM: sql insert into $tb values (1605045600000 + $ms , $x )
tdLog.info(
"insert into %s values (now + %s, %d)" %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
"insert into %s values (now + %s, %d)" %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
x = x + 1
# TSIM: endw
i = i + 1
......@@ -81,13 +81,13 @@ class TDTestCase:
(tb, mt))
x = 0
while (x < rowNum):
ms = "%dm" % x
ms = x * 60000
tdLog.info(
"insert into %s values (now + %s, %d)" %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
"insert into %s values (now + %s, %d)" %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
x = x + 1
# TSIM: endw
i = i + 1
......@@ -104,36 +104,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from %s where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % mt)
tdSql.query('select * from %s where ts < now + 4m' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % mt)
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % mt)
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % mt)
tdSql.query('select * from %s where ts > now + 4m' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % mt)
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % mt)
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % mt)
tdSql.query('select * from %s where ts = now + 4m' % mt)
# TSIM: sql select * from %s where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % mt)
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % mt)
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
mt)
tdLog.info('tdSql.checkRow(10)')
tdSql.checkRows(10)
......@@ -267,91 +267,91 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step6
tdLog.info('=============== step6')
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 = true
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 = true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = true' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = true' %
mt)
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 <> true
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> true' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> true' %
mt)
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol1 = false
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol1 = false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = false' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = false' %
mt)
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol1 <> false
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> false' %
mt)
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol1 = false
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = false' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = false' %
mt)
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol1 <> false
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> false' %
mt)
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol1 <> false
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> false' %
mt)
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 <> false
# and ts < now + 5m
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> false
# and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> false and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> false and ts < 1605045600000 + 300001' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> false and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> false and ts < 1605045600000 + 300001' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -361,84 +361,84 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step7
tdLog.info('=============== step7')
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol2 = 1' % mt)
tdSql.query('select * from %s where ts > now + 4m and tgcol2 = 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' % mt)
tdSql.query('select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' % mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 <> 1
tdLog.info('select * from %s where ts > now + 4m and tgcol2 <> 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' % mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol2 = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol2 = 0' % mt)
tdSql.query('select * from %s where ts < now + 4m and tgcol2 = 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' % mt)
tdSql.query('select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' % mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol2 <> 0
tdLog.info('select * from %s where ts < now + 4m and tgcol2 <> 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' % mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol2 = 0
tdLog.info('select * from %s where ts <= now + 4m and tgcol2 = 0' % mt)
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0
tdLog.info('select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' % mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol2 <> 0
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 <> 0 and ts
# < now + 5m
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -448,84 +448,84 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol3 = 1' % mt)
tdSql.query('select * from %s where ts > now + 4m and tgcol3 = 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1' % mt)
tdSql.query('select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1' % mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 1
tdLog.info('select * from %s where ts > now + 4m and tgcol3 <> 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1' % mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol3 = 0' % mt)
tdSql.query('select * from %s where ts < now + 4m and tgcol3 = 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0' % mt)
tdSql.query('select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0' % mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 <> 0
tdLog.info('select * from %s where ts < now + 4m and tgcol3 <> 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0' % mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 = 0
tdLog.info('select * from %s where ts <= now + 4m and tgcol3 = 0' % mt)
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0
tdLog.info('select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0' % mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 <> 0
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 0 and ts
# < now + 5m
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -535,104 +535,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step9
tdLog.info('=============== step9')
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and
# tgcol1 = true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol1 = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol1 = true' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol1 = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol1 = true' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and
# tgcol1 <> true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol1 <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol1 <> true' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol1 <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol1 <> true' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol2 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol1 = false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol1 = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = false' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol1 = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = false' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol1 <> false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol1 <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol1 <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> false' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol2 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol1 = false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol1 = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = false' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol1 = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = false' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol1 <> false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol1 <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol1 <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> false' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0 and tgcol1 <> false
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol1 <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol1 <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol1 <> false' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol1 <> false
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> false
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> false' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> false' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> false' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -642,104 +642,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step10
tdLog.info('=============== step10')
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and
# tgcol1 = true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol1 = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol1 = true' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol1 = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol1 = true' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and
# tgcol1 <> true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol1 <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol1 <> true' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol1 <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol1 <> true' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol1 = false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol1 = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol1 = false' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol1 = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol1 = false' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol1 <> false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol1 <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol1 <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol1 <> false' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol1 = false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol1 = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol1 = false' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol1 = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol1 = false' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol1 <> false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol1 <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol1 <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol1 <> false' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0 and tgcol1 <> false
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol1 <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol1 <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol1 <> false' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol1 <> false
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> false
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> false' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> false' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> false' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> false' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -749,104 +749,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and
# tgcol2 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol2 = 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol2 = 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and
# tgcol2 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol2 <> 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol2 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol2 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol2 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol2 <> 0
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -856,104 +856,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step12
tdLog.info('=============== step12')
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1 and
# tgcol2 = 1 and tgcol3 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol1 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol1 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol1 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol1 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1034,12 +1034,12 @@ class TDTestCase:
# TSIM: print =============== step15
tdLog.info('=============== step15')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1050,13 +1050,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = true
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1067,13 +1067,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = true and tgcol2 = 1
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true and tgcol2 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true and tgcol2 = 1' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true and tgcol2 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true and tgcol2 = 1' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1084,11 +1084,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = true and tgcol2 = 1 and tgcol3 = 1
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true and tgcol2 = 1 and tgcol3 = 1' % mt)
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true and tgcol2 = 1 and tgcol3 = 1' % mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true and tgcol2 = 1 and tgcol3 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true and tgcol2 = 1 and tgcol3 = 1' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1204,13 +1204,13 @@ class TDTestCase:
# TSIM: print =============== step18
tdLog.info('=============== step18')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001
# group by tgcol2
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol2' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol2' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1221,13 +1221,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = true group by tgcol2
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true group by tgcol2' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true group by tgcol2' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1238,11 +1238,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = true and tgcol2 = 1 group by tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true and tgcol2 = 1 group by tgcol2' % mt)
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true and tgcol2 = 1 group by tgcol2' % mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true and tgcol2 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true and tgcol2 = 1 group by tgcol2' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1253,10 +1253,10 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 group by tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % mt)
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % mt)
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % mt)
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......
......@@ -64,14 +64,14 @@ class TDTestCase:
(tb, mt))
x = 0
while (x < rowNum):
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
# TSIM: sql insert into $tb values (1605045600000 + $ms , $x )
tdLog.info(
"insert into %s values (now + %s, %d)" %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
"insert into %s values (now + %s, %d)" %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
x = x + 1
# TSIM: endw
i = i + 1
......@@ -87,14 +87,13 @@ class TDTestCase:
(tb, mt))
x = 0
while (x < rowNum):
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
"insert into %s values (now + %s, %d)" %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
"insert into %s values (now + %s, %d)" %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
x = x + 1
# TSIM: endw
i = i + 1
......@@ -111,36 +110,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from %s where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % mt)
tdSql.query('select * from %s where ts < now + 4m' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % mt)
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % mt)
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % mt)
tdSql.query('select * from %s where ts > now + 4m' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % mt)
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % mt)
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % mt)
tdSql.query('select * from %s where ts = now + 4m' % mt)
# TSIM: sql select * from %s where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % mt)
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % mt)
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
mt)
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -322,84 +321,84 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step7
tdLog.info('=============== step7')
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol1 = 1' % mt)
tdSql.query('select * from %s where ts > now + 4m and tgcol1 = 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1' % mt)
tdSql.query('select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1' % mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 <> 1
tdLog.info('select * from %s where ts > now + 4m and tgcol1 <> 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1' % mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol1 = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol1 = 0' % mt)
tdSql.query('select * from %s where ts < now + 4m and tgcol1 = 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0' % mt)
tdSql.query('select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0' % mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol1 <> 0
tdLog.info('select * from %s where ts < now + 4m and tgcol1 <> 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0' % mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol1 = 0
tdLog.info('select * from %s where ts <= now + 4m and tgcol1 = 0' % mt)
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0
tdLog.info('select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0' % mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol1 <> 0
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 <> 0 and ts
# < now + 5m
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -409,84 +408,84 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol2 = 1' % mt)
tdSql.query('select * from %s where ts > now + 4m and tgcol2 = 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' % mt)
tdSql.query('select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' % mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 <> 1
tdLog.info('select * from %s where ts > now + 4m and tgcol2 <> 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' % mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol2 = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol2 = 0' % mt)
tdSql.query('select * from %s where ts < now + 4m and tgcol2 = 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' % mt)
tdSql.query('select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' % mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol2 <> 0
tdLog.info('select * from %s where ts < now + 4m and tgcol2 <> 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' % mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol2 = 0
tdLog.info('select * from %s where ts <= now + 4m and tgcol2 = 0' % mt)
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0
tdLog.info('select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' % mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol2 <> 0
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 <> 0 and ts
# < now + 5m
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -496,84 +495,84 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step9
tdLog.info('=============== step9')
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol3 = 1' % mt)
tdSql.query('select * from %s where ts > now + 4m and tgcol3 = 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1' % mt)
tdSql.query('select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1' % mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 1
tdLog.info('select * from %s where ts > now + 4m and tgcol3 <> 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1' % mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol3 = 0' % mt)
tdSql.query('select * from %s where ts < now + 4m and tgcol3 = 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0' % mt)
tdSql.query('select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0' % mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 <> 0
tdLog.info('select * from %s where ts < now + 4m and tgcol3 <> 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0' % mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 = 0
tdLog.info('select * from %s where ts <= now + 4m and tgcol3 = 0' % mt)
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0
tdLog.info('select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0' % mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 <> 0
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 0 and ts
# < now + 5m
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -583,84 +582,84 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step10
tdLog.info('=============== step10')
# TSIM: sql select * from %s where ts > now + 4m and tgcol4 = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol4 = 1' % mt)
tdSql.query('select * from %s where ts > now + 4m and tgcol4 = 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1' % mt)
tdSql.query('select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1' % mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol4 <> 1
tdLog.info('select * from %s where ts > now + 4m and tgcol4 <> 1' % mt)
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1' % mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol4 = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol4 = 0' % mt)
tdSql.query('select * from %s where ts < now + 4m and tgcol4 = 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0' % mt)
tdSql.query('select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0' % mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol4 <> 0
tdLog.info('select * from %s where ts < now + 4m and tgcol4 <> 0' % mt)
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0' % mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol4 = 0
tdLog.info('select * from %s where ts <= now + 4m and tgcol4 = 0' % mt)
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0
tdLog.info('select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0' % mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol4 <> 0
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol4 <> 0 and ts
# < now + 5m
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -670,104 +669,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and
# tgcol1 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol1 = 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol1 = 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and
# tgcol1 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol1 <> 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol1 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol2 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol1 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol2 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol1 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol2 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol1 <> 0
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -777,104 +776,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step12
tdLog.info('=============== step12')
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and
# tgcol1 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol1 = 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol1 = 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and
# tgcol1 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol1 <> 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol1 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol1 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol1 = 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol1 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol1 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol1 = 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol1 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol1 <> 0
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -884,104 +883,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step13
tdLog.info('=============== step13')
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and
# tgcol2 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol2 = 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol2 = 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and
# tgcol2 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol2 <> 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol2 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol2 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol2 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol2 <> 0
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -991,104 +990,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step14
tdLog.info('=============== step14')
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and
# tgcol4 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol4 = 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol4 = 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and
# tgcol4 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol4 <> 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol4 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol4 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol4 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol4 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol4 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol3 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol4 <> 0
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1098,104 +1097,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step15
tdLog.info('=============== step15')
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1 and
# tgcol2 = 1 and tgcol3 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol1 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol1 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol1 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol1 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol1 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1205,104 +1204,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step16
tdLog.info('=============== step16')
# TSIM: sql select * from %s where ts > now + 4m and tgcol4 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and
# tgcol2 = 1 and tgcol3 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol4 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol4 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol4 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol4 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1312,105 +1311,105 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step17
tdLog.info('=============== step17')
# TSIM: sql select * from %s where ts > now + 4m and tgcol4 = 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and
# tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol4 <> 1 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
mt)
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol4 = 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts < now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol4 = 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts <= now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from %s where ts > now + 4m and tgcol4 <> 0 and ts
# < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and
# TSIM: sql select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts
# < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
mt)
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1508,12 +1507,12 @@ class TDTestCase:
# TSIM: print =============== step20
tdLog.info('=============== step20')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1524,13 +1523,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = 1
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1541,13 +1540,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = 1 and tgcol2 = 1
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1558,13 +1557,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1575,10 +1574,10 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' % mt)
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' % mt)
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' % mt)
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' % mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......@@ -1722,13 +1721,13 @@ class TDTestCase:
# TSIM: print =============== step23
tdLog.info('=============== step23')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001
# group by tgcol2
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol2' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol2' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1739,13 +1738,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = 1 group by tgcol2
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 group by tgcol2' %
mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 group by tgcol2' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1756,11 +1755,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = 1 and tgcol2 = 1 group by tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' % mt)
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' % mt)
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' %
mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1771,10 +1770,10 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % mt)
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % mt)
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % mt)
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......@@ -1784,11 +1783,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and
# max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and
# tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by
# tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % mt)
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % mt)
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % mt)
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % mt)
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......
......@@ -76,14 +76,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s, %d)' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s, %d)' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -105,14 +104,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s, %d)' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s, %d)' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -131,36 +129,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -377,98 +375,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol1 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol1 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol1 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol1 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol1 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol1 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -478,98 +476,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step9
tdLog.info('=============== step9')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -579,98 +577,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step10
tdLog.info('=============== step10')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -680,98 +678,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -781,98 +779,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step12
tdLog.info('=============== step12')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol5 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol5 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol5 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol5 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol5 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol5 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol5 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol5 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol5 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol5 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol5 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol5 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol5 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol5 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol5 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol5 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol5 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -882,104 +880,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step13
tdLog.info('=============== step13')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = 1 and
# tgcol1 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol1 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol1 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 1 and
# tgcol1 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol1 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol1 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol1 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol1 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol1 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -989,104 +987,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step14
tdLog.info('=============== step14')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 = 1 and
# tgcol2 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol2 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol2 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 1 and
# tgcol2 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol2 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol2 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol2 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol2 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1096,104 +1094,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step15
tdLog.info('=============== step15')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 = 1 and
# tgcol4 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol4 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol4 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 1 and
# tgcol4 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol4 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol4 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol4 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol4 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol4 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1203,104 +1201,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step16
tdLog.info('=============== step16')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 = 1 and
# tgcol4 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 = 1 and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 = 1 and tgcol4 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 = 1 and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 = 1 and tgcol4 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 <> 1 and
# tgcol4 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 <> 1 and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 1 and tgcol4 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 <> 1 and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 1 and tgcol4 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol5 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol5 = 0 and
# tgcol4 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol5 = 0 and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 = 0 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol5 = 0 and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 = 0 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol5 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol5 <> 0 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol5 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol5 = 0 and
# tgcol4 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol5 = 0 and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 = 0 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol5 = 0 and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 = 0 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol5 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol5 <> 0 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol5 <> 0 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol4 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 <> 0 and ts < now + 5m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 <> 0 and ts < now + 5m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1310,104 +1308,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step17
tdLog.info('=============== step17')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 = 1 and
# tgcol2 = 1 and tgcol3 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol1 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol1 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol1 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol1 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol1 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol1 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol1 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1417,104 +1415,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step18
tdLog.info('=============== step18')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 = 1 and
# tgcol2 = 1 and tgcol3 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1524,105 +1522,105 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step19
tdLog.info('=============== step19')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 = 1 and
# tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1632,106 +1630,106 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step20
tdLog.info('=============== step20')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 = 1 and
# tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and
# tgcol5 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and
# tgcol1 <> 0 and tgcol5 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1844,12 +1842,12 @@ class TDTestCase:
# TSIM: print =============== step23
tdLog.info('=============== step23')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1860,13 +1858,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1877,13 +1875,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1894,13 +1892,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1911,11 +1909,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' % (mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -1926,11 +1924,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and
# tgcol5 = 1
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1' % (mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......@@ -2106,13 +2104,13 @@ class TDTestCase:
# TSIM: print =============== step26
tdLog.info('=============== step26')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol2
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol2' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol2' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2123,13 +2121,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 group by tgcol2
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 group by tgcol2' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 group by tgcol2' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2140,13 +2138,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 group by tgcol2
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2157,11 +2155,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % (mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2172,11 +2170,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by
# tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % (mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......@@ -2186,11 +2184,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and
# tgcol5 = 1 group by tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 group by tgcol2' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 group by tgcol2' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 group by tgcol2' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 group by tgcol2' % (mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......
......@@ -79,14 +79,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -110,14 +109,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -136,36 +134,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -417,98 +415,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step9
tdLog.info('=============== step9')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol1 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol1 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol1 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol1 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol1 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol1 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -518,98 +516,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step10
tdLog.info('=============== step10')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -619,98 +617,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -720,98 +718,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step12
tdLog.info('=============== step12')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -821,98 +819,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step13
tdLog.info('=============== step13')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol5 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol5 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol5 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol5 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol5 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol5 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol5 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol5 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol5 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol5 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol5 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol5 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol5 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol5 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol5 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol5 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol5 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -922,98 +920,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step14
tdLog.info('=============== step14')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol6 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol6 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol6 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol6 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol6 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol6 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol6 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol6 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol6 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol6 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol6 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol6 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol6 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol6 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol6 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol6 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol6 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol6 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol6 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol6 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol6 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol6 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol6 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol6 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol6 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol6 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol6 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol6 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol6 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol6 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol6 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol6 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol6 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol6 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol6 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol6 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol6 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol6 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol6 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol6 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol6 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1023,104 +1021,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step15
tdLog.info('=============== step15')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = 1 and
# tgcol1 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol1 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol1 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 1 and
# tgcol1 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol1 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol1 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol1 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol1 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol1 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1130,104 +1128,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step16
tdLog.info('=============== step16')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 = 1 and
# tgcol2 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol2 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol2 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 1 and
# tgcol2 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol2 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol2 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol2 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol2 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1237,104 +1235,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step17
tdLog.info('=============== step17')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 = 1 and
# tgcol4 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol4 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 = 1 and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 = 1 and tgcol4 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 1 and
# tgcol4 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol4 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 1 and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 1 and tgcol4 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol4 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 = 0 and
# tgcol4 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 = 0 and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 = 0 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol3 <> 0 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol3 <> 0 and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol3 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol3 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol4 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol3 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol3 <> 0 and ts < now + 5m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol3 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1344,104 +1342,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step18
tdLog.info('=============== step18')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 = 1 and
# tgcol4 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 = 1 and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 = 1 and tgcol4 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 = 1 and tgcol4 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 = 1 and tgcol4 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 <> 1 and
# tgcol4 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 <> 1 and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 1 and tgcol4 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 <> 1 and tgcol4 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 1 and tgcol4 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol5 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol5 = 0 and
# tgcol4 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol5 = 0 and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 = 0 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol5 = 0 and tgcol4 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 = 0 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol5 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol5 <> 0 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol5 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol5 = 0 and
# tgcol4 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol5 = 0 and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 = 0 and tgcol4 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol5 = 0 and tgcol4 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 = 0 and tgcol4 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol5 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol5 <> 0 and
# tgcol4 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol5 <> 0 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol5 <> 0 and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol5 <> 0 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol4 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 <> 0 and ts < now + 5m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 <> 0 and ts < now + 5m and ts < now + 5m and tgcol4 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol4 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1451,104 +1449,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step19
tdLog.info('=============== step19')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 = 1 and
# tgcol6 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 = 1 and tgcol6 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 = 1 and tgcol6 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 = 1 and tgcol6 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 = 1 and tgcol6 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 <> 1 and
# tgcol6 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 <> 1 and tgcol6 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 1 and tgcol6 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 <> 1 and tgcol6 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 1 and tgcol6 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol5 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol5 = 0 and
# tgcol6 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol5 = 0 and tgcol6 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 = 0 and tgcol6 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol5 = 0 and tgcol6 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 = 0 and tgcol6 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol5 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol5 <> 0 and
# tgcol6 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol5 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol5 = 0 and
# tgcol6 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol5 = 0 and tgcol6 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 = 0 and tgcol6 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol5 = 0 and tgcol6 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 = 0 and tgcol6 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol5 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol5 <> 0 and
# tgcol6 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol5 <> 0 and tgcol6 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol5 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol6 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol5 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol6 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol5 <> 0 and ts < now + 5m and ts < now + 5m and tgcol6 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol5 <> 0 and ts < now + 5m and ts < now + 5m and tgcol6 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol5 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1558,104 +1556,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step20
tdLog.info('=============== step20')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 = 1 and
# tgcol2 = 1 and tgcol3 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol1 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol1 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol1 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol1 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol1 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol1 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol1 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol1 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol1 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol1 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol1 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol1 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1665,104 +1663,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step21
tdLog.info('=============== step21')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 = 1 and
# tgcol2 = 1 and tgcol3 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1772,105 +1770,105 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step22
tdLog.info('=============== step22')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 = 1 and
# tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and
# tgcol1 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1880,106 +1878,106 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step23
tdLog.info('=============== step23')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 = 1 and
# tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and
# tgcol5 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and
# tgcol1 <> 0 and tgcol5 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -1989,112 +1987,112 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step24
tdLog.info('=============== step24')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 = 1 and
# tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1 and tgcol6 =
# 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1 and tgcol6 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1 and tgcol6 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1 and tgcol6 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol1 = 1 and tgcol5 = 1 and tgcol6 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 1 and
# tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1 and
# tgcol6 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1 and tgcol6 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1 and tgcol6 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1 and tgcol6 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 1 and tgcol2 <> 1 and tgcol3 <> 1 and tgcol1 <> 1 and tgcol5 <> 1 and tgcol6 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0 and tgcol6 =
# 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0 and tgcol6 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0 and tgcol6 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0 and tgcol6 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0 and tgcol6 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and
# tgcol6 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 = 0 and
# tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0 and tgcol6 =
# 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0 and tgcol6 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0 and tgcol6 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0 and tgcol6 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 = 0 and tgcol2 = 0 and tgcol3 = 0 and tgcol1 = 0 and tgcol5 = 0 and tgcol6 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol4 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and
# tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and
# tgcol6 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and
# tgcol5 <> 0 and tgcol6 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol4 <> 0 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol4 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol4 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and
# tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol4 <> 0 and ts < now + 5m and ts < now + 5m and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol4 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol3 <> 0 and tgcol1 <> 0 and tgcol5 <> 0 and tgcol6 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -2221,12 +2219,12 @@ class TDTestCase:
# TSIM: print =============== step27
tdLog.info('=============== step27')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2237,13 +2235,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2254,13 +2252,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2271,13 +2269,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2288,11 +2286,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' % (mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2303,11 +2301,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and
# tgcol5 = 1
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1' % (mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......@@ -2317,11 +2315,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and
# tgcol5 = 1 and tgcol6 = 1
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 and tgcol6 = 1' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 and tgcol6 = 1' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 and tgcol6 = 1' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 and tgcol6 = 1' % (mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......@@ -2527,13 +2525,13 @@ class TDTestCase:
# TSIM: print =============== step30
tdLog.info('=============== step30')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol2
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol2' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol2' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2544,13 +2542,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 group by tgcol2
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 group by tgcol2' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 group by tgcol2' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2561,13 +2559,13 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 group by tgcol2
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 group by tgcol2' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2578,11 +2576,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' % (mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 group by tgcol2' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -2593,11 +2591,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by
# tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 group by tgcol2' % (mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......@@ -2607,11 +2605,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and
# tgcol5 = 1 group by tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 group by tgcol2' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 group by tgcol2' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 group by tgcol2' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 group by tgcol2' % (mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......@@ -2621,11 +2619,11 @@ class TDTestCase:
# TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and
# tgcol5 = 1 and tgcol6 = 1 group by tgcol2
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 and tgcol6 = 1 group by tgcol2' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 and tgcol6 = 1 group by tgcol2' % (mt))
tdLog.info('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 and tgcol6 = 1 group by tgcol2' % (mt))
tdSql.query('select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 and tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 and tgcol6 = 1 group by tgcol2' % (mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
# TSIM: if $data00 != 25 then
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,56 +122,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -190,25 +188,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -227,36 +225,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -333,94 +331,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -467,12 +465,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -522,13 +520,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,56 +122,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -190,25 +188,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -227,36 +225,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -333,98 +331,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = '1'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> '1'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = '0'
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> '0'
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> '0'
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> "0"' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> '0' and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> '0' and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> "0" and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "0" and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> "0" and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "0" and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -471,12 +469,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -526,13 +524,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -74,14 +74,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -102,14 +101,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -128,36 +126,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -269,98 +267,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = '1'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> '1'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = '0'
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> '0'
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> '0'
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> "0"' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> '0' and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> '0' and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> "0" and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "0" and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> "0" and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> "0" and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -370,98 +368,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step6
tdLog.info('=============== step6')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = '1'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '1'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = '0'
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> '0'
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> '0'
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0"' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '0' and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '0' and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -471,104 +469,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step7
tdLog.info('=============== step7')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = '1' and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = '1' and
# tgcol = '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = "1" and tgcol = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1" and tgcol = "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = "1" and tgcol = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1" and tgcol = "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '1' and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '1' and
# tgcol <> '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "1" and tgcol <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1" and tgcol <> "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "1" and tgcol <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1" and tgcol <> "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = '0' and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = '0' and
# tgcol = '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = "0" and tgcol = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0" and tgcol = "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = "0" and tgcol = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0" and tgcol = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> '0' and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> '0' and
# tgcol <> '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> "0" and tgcol <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> "0" and tgcol <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = '0' and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = '0' and
# tgcol = '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = "0" and tgcol = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0" and tgcol = "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = "0" and tgcol = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0" and tgcol = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> '0'
# and tgcol <> '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> "0" and tgcol <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> "0" and tgcol <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> '0' and tgcol <> '0'
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0" and tgcol <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0" and tgcol <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0" and tgcol <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0" and tgcol <> "0"' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '0' and
# ts < now + 5m and ts < now + 5m and tgcol <> '0'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '0' and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> '0'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m and ts < now + 5m and tgcol <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m and ts < now + 5m and tgcol <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> "0"' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -648,12 +646,12 @@ class TDTestCase:
# TSIM: print =============== step10
tdLog.info('=============== step10')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -738,13 +736,13 @@ class TDTestCase:
# TSIM: print =============== step13
tdLog.info('=============== step13')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -71,14 +71,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -97,14 +96,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -123,81 +121,81 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -216,36 +214,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -324,98 +322,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = true
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = true' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = true' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> true
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> true' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> true' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = false
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = false' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> false
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = false
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = false' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> false
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> false
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> false
# and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> false
# and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> false and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> false and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> false and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> false and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -462,12 +460,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -517,13 +515,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -71,14 +71,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -96,14 +95,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -122,36 +120,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -263,98 +261,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = true
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = true' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = true' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> true
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> true' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> true' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = false
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = false' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> false
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = false
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = false' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> false
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> false
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> false
# and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> false
# and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> false and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> false and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> false and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> false and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -364,98 +362,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step6
tdLog.info('=============== step6')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = '1'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '1'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = '0'
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> '0'
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> '0'
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0"' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '0' and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '0' and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -465,104 +463,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step7
tdLog.info('=============== step7')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = '1' and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = '1' and
# tgcol = true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = "1" and tgcol = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1" and tgcol = true' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = "1" and tgcol = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1" and tgcol = true' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '1' and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '1' and
# tgcol <> true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "1" and tgcol <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1" and tgcol <> true' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "1" and tgcol <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1" and tgcol <> true' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = '0' and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = '0' and
# tgcol = false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = "0" and tgcol = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0" and tgcol = false' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = "0" and tgcol = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0" and tgcol = false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> '0' and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> '0' and
# tgcol <> false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> "0" and tgcol <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> "0" and tgcol <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = '0' and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = '0' and
# tgcol = false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = "0" and tgcol = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0" and tgcol = false' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = "0" and tgcol = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0" and tgcol = false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> '0'
# and tgcol <> false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> "0" and tgcol <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> "0" and tgcol <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> '0' and tgcol <> false
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0" and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0" and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0" and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0" and tgcol <> false' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '0' and
# ts < now + 5m and ts < now + 5m and tgcol <> false
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '0' and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> false
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m and ts < now + 5m and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m and ts < now + 5m and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -642,12 +640,12 @@ class TDTestCase:
# TSIM: print =============== step10
tdLog.info('=============== step10')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -732,13 +730,13 @@ class TDTestCase:
# TSIM: print =============== step13
tdLog.info('=============== step13')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -71,14 +71,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -96,14 +95,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -122,36 +120,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -295,98 +293,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = true
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = true' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = true' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> true
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> true' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> true' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = false
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = false' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> false
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = false
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = false' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> false
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> false
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> false
# and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> false
# and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> false and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> false and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> false and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> false and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -396,98 +394,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step6
tdLog.info('=============== step6')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -497,104 +495,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step7
tdLog.info('=============== step7')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = 1 and
# tgcol = true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol = true' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol = true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol = true' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 1 and
# tgcol <> true
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol <> true' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol <> true' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol <> true' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol = false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol = false' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol = false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol = false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol <> false
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol <> false' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol <> false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol = false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol = false' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol = false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol = false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol <> false
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol <> false' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol <> false' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0 and tgcol <> false
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol <> false' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol <> false
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> false
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> false' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol <> false' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> false' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -674,12 +672,12 @@ class TDTestCase:
# TSIM: print =============== step10
tdLog.info('=============== step10')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -764,13 +762,13 @@ class TDTestCase:
# TSIM: print =============== step13
tdLog.info('=============== step13')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,56 +122,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -190,25 +188,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -227,36 +225,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -333,94 +331,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -467,12 +465,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -522,13 +520,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,56 +122,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -190,25 +188,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -227,36 +225,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -333,94 +331,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -467,12 +465,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -522,13 +520,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -71,14 +71,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -97,14 +96,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -123,56 +121,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -189,25 +187,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -226,36 +224,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -332,94 +330,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -466,12 +464,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -521,13 +519,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,36 +122,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -265,94 +263,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -362,98 +360,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step6
tdLog.info('=============== step6')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = '1'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '1'
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '1'
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "1"' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1"' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = '0'
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> '0'
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> '0'
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> "0"' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> '0'
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> "0"' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0"' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> '0'
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0"' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0"' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0"' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '0' and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '0' and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -463,104 +461,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step7
tdLog.info('=============== step7')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = '1' and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = '1' and
# tgcol = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = "1" and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1" and tgcol = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = "1" and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = "1" and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '1' and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '1' and
# tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "1" and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1" and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "1" and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "1" and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = '0' and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = '0' and
# tgcol = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = "0" and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0" and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = "0" and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = "0" and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> '0' and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> '0' and
# tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> "0" and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> "0" and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = '0' and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = '0' and
# tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = "0" and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0" and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = "0" and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = "0" and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> '0'
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> '0'
# and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> "0" and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> "0" and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> "0" and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> '0' and tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0" and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0" and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> "0" and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> "0" and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> '0' and
# ts < now + 5m and ts < now + 5m and tgcol <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> '0' and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> "0" and ts < now + 5m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> "0" and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -640,12 +638,12 @@ class TDTestCase:
# TSIM: print =============== step10
tdLog.info('=============== step10')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -730,13 +728,13 @@ class TDTestCase:
# TSIM: print =============== step13
tdLog.info('=============== step13')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,36 +122,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -301,94 +299,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -398,98 +396,98 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step6
tdLog.info('=============== step6')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 0 and
# ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 0 and
# ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -499,104 +497,104 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step7
tdLog.info('=============== step7')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 = 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 = 1 and
# tgcol = 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol = 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 = 1 and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 = 1 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 1 and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 1 and
# tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 1 and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 1 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 = 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol = 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 = 0 and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 = 0 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol2 <> 0 and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol2 <> 0 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 = 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 = 0 and
# tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 = 0 and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 = 0 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol2 <> 0 and
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol2 <> 0 and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol2 <> 0 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol2 <> 0 and tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol2 <> 0 and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol2 <> 0 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol2 <> 0 and
# ts < now + 5m and ts < now + 5m and tgcol <> 0
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol2 <> 0 and
# ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol2 <> 0 and ts < now + 5m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol2 <> 0 and ts < 1605045600000 + 300001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -676,12 +674,12 @@ class TDTestCase:
# TSIM: print =============== step10
tdLog.info('=============== step10')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -766,13 +764,13 @@ class TDTestCase:
# TSIM: print =============== step13
tdLog.info('=============== step13')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,56 +122,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -190,25 +188,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -227,36 +225,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -333,94 +331,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -467,12 +465,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -522,13 +520,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,56 +122,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -190,25 +188,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -227,36 +225,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -333,94 +331,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -467,12 +465,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -522,13 +520,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,56 +122,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -190,25 +188,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -227,36 +225,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -333,94 +331,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -467,12 +465,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -522,13 +520,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,56 +122,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -190,25 +188,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -227,36 +225,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -333,94 +331,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -467,12 +465,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -522,13 +520,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,56 +122,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -190,25 +188,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -227,36 +225,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -333,94 +331,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -467,12 +465,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -522,13 +520,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
......@@ -72,14 +72,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -98,14 +97,13 @@ class TDTestCase:
# TSIM: while $x < $rowNum
while (x < rowNum):
# TSIM: $ms = $x . m
ms = "%dm" % x
# TSIM: sql insert into $tb values (now + $ms , $x )
ms = x * 60000
tdLog.info(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
tdSql.execute(
'insert into %s values (now + %s , %d )' %
(tb, ms, x))
"insert into %s values (%d, %d)" %
(tb, 1605045600000 + ms, x))
# TSIM: $x = $x + 1
x = x + 1
# TSIM: endw
......@@ -124,56 +122,56 @@ class TDTestCase:
tdSql.checkRows(rowNum)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (tb))
tdSql.query('select * from %s where ts < now + 4m' % (tb))
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog.info('select * from %s where ts <= now + 4m' % (tb))
tdSql.query('select * from %s where ts <= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts <= 1605045600000 + 240001
tdLog.info('select * from %s where ts <= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts <= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (tb))
tdSql.query('select * from %s where ts > now + 4m' % (tb))
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog.info('select * from %s where ts >= now + 4m' % (tb))
tdSql.query('select * from %s where ts >= now + 4m' % (tb))
# TSIM: sql select * from $tb where ts >= 1605045600000 + 240001
tdLog.info('select * from %s where ts >= 1605045600000 + 240001' % (tb))
tdSql.query('select * from %s where ts >= 1605045600000 + 240001' % (tb))
# TSIM: if $rows != 15 then
tdLog.info('tdSql.checkRow(15)')
tdSql.checkRows(15)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
# TSIM: sql select * from $tb where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001
tdLog.info(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
tdSql.query(
'select * from %s where ts < now + 4m and ts > now + 5m' %
'select * from %s where ts < 1605045600000 + 240001 and ts > 1605045600000 + 300001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
......@@ -190,25 +188,25 @@ class TDTestCase:
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 3m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 180001' %
(tb))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
# TSIM: sql select * from $tb where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and
# ts < 1605045600000 + 360001
tdLog.info(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
tdSql.query(
'select * from %s where ts > now + 4m and ts > now + 5m and ts < now + 6m' %
'select * from %s where ts > 1605045600000 + 240001 and ts > 1605045600000 + 300001 and ts < 1605045600000 + 360001' %
(tb))
# TSIM: if $rows != 1 then
tdLog.info('tdSql.checkRow(1)')
......@@ -227,36 +225,36 @@ class TDTestCase:
# TSIM: return -1
# TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog.info('select * from %s where ts < now + 4m' % (mt))
tdSql.query('select * from %s where ts < now + 4m' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001
tdLog.info('select * from %s where ts < 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts < 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 50 then
tdLog.info('tdSql.checkRow(50)')
tdSql.checkRows(50)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog.info('select * from %s where ts > now + 4m' % (mt))
tdSql.query('select * from %s where ts > now + 4m' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001
tdLog.info('select * from %s where ts > 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts > 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 150 then
tdLog.info('tdSql.checkRow(150)')
tdSql.checkRows(150)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog.info('select * from %s where ts = now + 4m' % (mt))
tdSql.query('select * from %s where ts = now + 4m' % (mt))
# TSIM: sql select * from $mt where ts = 1605045600000 + 240001
tdLog.info('select * from %s where ts = 1605045600000 + 240001' % (mt))
tdSql.query('select * from %s where ts = 1605045600000 + 240001' % (mt))
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 10 then
tdLog.info('tdSql.checkRow(10)')
......@@ -333,94 +331,94 @@ class TDTestCase:
# TSIM:
# TSIM: print =============== step5
tdLog.info('=============== step5')
# TSIM: sql select * from $mt where ts > now + 4m and tgcol = 1
tdLog.info('select * from %s where ts > now + 4m and tgcol = 1' % (mt))
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol = 1
tdLog.info('select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' % (mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol = 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol = 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 1
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 1' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 1' %
(mt))
# TSIM: if $rows != 75 then
tdLog.info('tdSql.checkRow(75)')
tdSql.checkRows(75)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog.info('select * from %s where ts < now + 4m and tgcol = 0' % (mt))
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol = 0
tdLog.info('select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' % (mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol = 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts < 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts < now + 4m and tgcol <> 0' %
'select * from %s where ts < 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol = 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol = 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol = 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
# TSIM: sql select * from $mt where ts <= 1605045600000 + 240001 and tgcol <> 0
tdLog.info(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts <= now + 4m and tgcol <> 0' %
'select * from %s where ts <= 1605045600000 + 240001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 25 then
tdLog.info('tdSql.checkRow(25)')
tdSql.checkRows(25)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and
# tgcol <> 0
tdLog.info(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and ts < now + 5m and tgcol <> 0' %
'select * from %s where ts > 1605045600000 + 240001 and ts < 1605045600000 + 300001 and tgcol <> 0' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
tdSql.checkRows(5)
# TSIM: return -1
# TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
# TSIM: sql select * from $mt where ts > 1605045600000 + 240001 and tgcol <> 0 and ts
# < 1605045600000 + 300001
tdLog.info(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
tdSql.query(
'select * from %s where ts > now + 4m and tgcol <> 0 and ts < now + 5m' %
'select * from %s where ts > 1605045600000 + 240001 and tgcol <> 0 and ts < 1605045600000 + 300001' %
(mt))
# TSIM: if $rows != 5 then
tdLog.info('tdSql.checkRow(5)')
......@@ -467,12 +465,12 @@ class TDTestCase:
# TSIM: print =============== step8
tdLog.info('=============== step8')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......@@ -522,13 +520,13 @@ class TDTestCase:
# TSIM: print =============== step11
tdLog.info('=============== step11')
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < now + 4m
# max(tbcol), first(tbcol), last(tbcol) from $mt where ts < 1605045600000 + 240001
# group by tgcol
tdLog.info(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
tdSql.query(
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < now + 4m group by tgcol' %
'select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from %s where ts < 1605045600000 + 240001 group by tgcol' %
(mt))
# TSIM: print $data00 $data01 $data02 $data03 $data04 $data05 $data06
tdLog.info('$data00 $data01 $data02 $data03 $data04 $data05 $data06')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册