[TD-2610]<fix>: null data return nothing in case of stddev query.
This commit is contained in:
parent
f511effa99
commit
d8e20daf03
|
@ -1328,7 +1328,7 @@ static void stddev_function_f(SQLFunctionCtx *pCtx, int32_t index) {
|
||||||
/* the first stage is to calculate average value */
|
/* the first stage is to calculate average value */
|
||||||
if (pStd->stage == 0) {
|
if (pStd->stage == 0) {
|
||||||
avg_function_f(pCtx, index);
|
avg_function_f(pCtx, index);
|
||||||
} else {
|
} else if (pStd->num > 0) {
|
||||||
double avg = pStd->avg;
|
double avg = pStd->avg;
|
||||||
void * pData = GET_INPUT_DATA(pCtx, index);
|
void * pData = GET_INPUT_DATA(pCtx, index);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue