未验证 提交 ab8ca088 编写于 作者: S shenglian-zhou 提交者: GitHub

Merge pull request #10828 from taosdata/feature/TD-14104

Feature/td 14104
......@@ -5869,7 +5869,7 @@ static void state_count_function(SQLFunctionCtx *pCtx) {
SResultRowCellInfo *pResInfo = GET_RES_INFO(pCtx);
SStateInfo *pStateInfo = GET_ROWCELL_INTERBUF(pResInfo);
void *data = GET_INPUT_DATA_LIST(pCtx);
char *data = GET_INPUT_DATA_LIST(pCtx);
int64_t *pOutput = (int64_t *)pCtx->pOutput;
for (int32_t i = 0; i < pCtx->size; i++,pOutput++,data += pCtx->inputBytes) {
......@@ -5898,7 +5898,7 @@ static void state_duration_function(SQLFunctionCtx *pCtx) {
SResultRowCellInfo *pResInfo = GET_RES_INFO(pCtx);
SStateInfo *pStateInfo = GET_ROWCELL_INTERBUF(pResInfo);
void *data = GET_INPUT_DATA_LIST(pCtx);
char *data = GET_INPUT_DATA_LIST(pCtx);
TSKEY* tsList = GET_TS_LIST(pCtx);
int64_t *pOutput = (int64_t *)pCtx->pOutput;
......
......@@ -325,6 +325,14 @@ class TDTestCase:
tdSql.query('select unique(unique.voltage) from unique, unique2 where unique.ts=unique2.ts and unique.groupid=unique2.groupid')
tdSql.checkRows(1)
#TD-14104
ts = 1642592221000
sql = "insert into D004 values"
for i in range(3000):
sql += " (%d,%d,%d)"%(ts + i*1000, i, i)
tdSql.execute(sql)
tdSql.query("select unique(num) from (select * from unique)")
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册