提交 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) {
char* p = calloc(1, pSup->tagLen);
while ((row = taos_fetch_row(tres)) != NULL) {
int32_t* length = taos_fetch_lengths(tres);
memset(p, 0, pSup->tagLen);
int32_t offset = 0;
......@@ -2294,7 +2295,7 @@ void tscFirstRoundRetrieveCallback(void* param, TAOS_RES* tres, int numOfRows) {
} else {
if(pExpr->base.resType == TSDB_DATA_TYPE_NCHAR){
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) {
tscError("stddev convert tag error:%d", ret);
}else{
......
......@@ -145,7 +145,7 @@ class TDTestCase:
tdSql.query("select stddev(col1) from stdtableint group by num")
tdSql.checkData(0, 0, 0.5)
tdSql.checkData(1, 0, 0.5)
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.
先完成此消息的编辑!
想要评论请 注册