提交 77f13ae9 编写于 作者: wmmhello's avatar wmmhello

<fix>[TD-11459] fix bugs result is empty if stddev with group by nchar

上级 640855e0
...@@ -2281,6 +2281,7 @@ void tscFirstRoundRetrieveCallback(void* param, TAOS_RES* tres, int numOfRows) { ...@@ -2281,6 +2281,7 @@ void tscFirstRoundRetrieveCallback(void* param, TAOS_RES* tres, int numOfRows) {
char* p = calloc(1, pSup->tagLen); char* p = calloc(1, pSup->tagLen);
while ((row = taos_fetch_row(tres)) != NULL) { while ((row = taos_fetch_row(tres)) != NULL) {
int32_t* length = taos_fetch_lengths(tres);
memset(p, 0, pSup->tagLen); memset(p, 0, pSup->tagLen);
int32_t offset = 0; int32_t offset = 0;
...@@ -2294,7 +2295,7 @@ void tscFirstRoundRetrieveCallback(void* param, TAOS_RES* tres, int numOfRows) { ...@@ -2294,7 +2295,7 @@ void tscFirstRoundRetrieveCallback(void* param, TAOS_RES* tres, int numOfRows) {
} else { } else {
if(pExpr->base.resType == TSDB_DATA_TYPE_NCHAR){ if(pExpr->base.resType == TSDB_DATA_TYPE_NCHAR){
int32_t output = 0; int32_t output = 0;
bool ret = taosMbsToUcs4(varDataVal(row[i]), varDataLen(row[i]), varDataVal(p + offset), pExpr->base.resBytes, &output); bool ret = taosMbsToUcs4(row[i], length[i], varDataVal(p + offset), pExpr->base.resBytes, &output);
if (!ret) { if (!ret) {
tscError("stddev convert tag error:%d", ret); tscError("stddev convert tag error:%d", ret);
}else{ }else{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册