[TD-2610]<fix>: null data return nothing in case of stddev query.

This commit is contained in:
Haojun Liao 2021-01-07 22:38:38 +08:00
parent f511effa99
commit d8e20daf03
1 changed files with 1 additions and 1 deletions

View File

@ -1328,7 +1328,7 @@ static void stddev_function_f(SQLFunctionCtx *pCtx, int32_t index) {
/* the first stage is to calculate average value */
if (pStd->stage == 0) {
avg_function_f(pCtx, index);
} else {
} else if (pStd->num > 0) {
double avg = pStd->avg;
void * pData = GET_INPUT_DATA(pCtx, index);