Merge pull request #5375 from taosdata/hotfix/TD-3196
[TD-3196]client crashes for stddev query with NULL tag value
This commit is contained in:
commit
776c80a7cc
|
@ -1941,7 +1941,11 @@ void tscFirstRoundRetrieveCallback(void* param, TAOS_RES* tres, int numOfRows) {
|
||||||
|
|
||||||
// tag or group by column
|
// tag or group by column
|
||||||
if (TSDB_COL_IS_TAG(pExpr->colInfo.flag) || pExpr->functionId == TSDB_FUNC_PRJ) {
|
if (TSDB_COL_IS_TAG(pExpr->colInfo.flag) || pExpr->functionId == TSDB_FUNC_PRJ) {
|
||||||
|
if (row[i] == NULL) {
|
||||||
|
setNull(p + offset, pExpr->resType, pExpr->resBytes);
|
||||||
|
} else {
|
||||||
memcpy(p + offset, row[i], length[i]);
|
memcpy(p + offset, row[i], length[i]);
|
||||||
|
}
|
||||||
offset += pExpr->resBytes;
|
offset += pExpr->resBytes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue