fix: coverity issues

CID: 400170
This commit is contained in:
Ganlin Zhao 2022-10-11 11:29:18 +08:00
parent b2f19def37
commit 37a9143fcb
1 changed files with 1 additions and 1 deletions

View File

@ -1992,7 +1992,7 @@ int32_t avgScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *
}
}
if (hasNull) {
if (hasNull || (count == 0)) {
colDataAppendNULL(pOutputData, 0);
} else {
if (IS_SIGNED_NUMERIC_TYPE(type)) {