提交 2f1e75ed 编写于 作者: wmmhello's avatar wmmhello

Merge branch 'feature/TD-11208-new' of github.com:taosdata/TDengine into feature/TD-11208-new

......@@ -5196,7 +5196,7 @@ static bool unique_function_setup(SQLFunctionCtx *pCtx, SResultRowCellInfo* pRes
}
static void do_unique_function(SQLFunctionCtx *pCtx, SUniqueFuncInfo *pInfo, TSKEY timestamp, char *pData, char *tag, int32_t bytes){
UniqueUnit *unique = taosHashGet(*pCtx->pUniqueSet, pData, bytes);
UniqueUnit **unique = taosHashGet(*pCtx->pUniqueSet, pData, bytes);
if (unique == NULL) {
size_t size = sizeof(UniqueUnit) + bytes + pCtx->tagInfo.tagsLen;
char *tmp = pInfo->res + pInfo->num * size;
......@@ -5224,8 +5224,8 @@ static void do_unique_function(SQLFunctionCtx *pCtx, SUniqueFuncInfo *pInfo, TSK
taosHashPut(*pCtx->pUniqueSet, pData, bytes, &tmp, sizeof(UniqueUnit*));
pInfo->num++;
}else if(unique->timestamp > timestamp){
unique->timestamp = timestamp;
}else if((*unique)->timestamp > timestamp){
(*unique)->timestamp = timestamp;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册