fix(query): fix max/min with null input

This commit is contained in:
Ganlin Zhao 2022-07-26 20:07:28 +08:00
parent 2dc24b2692
commit 320525edf9
1 changed files with 5 additions and 0 deletions

View File

@ -1577,6 +1577,11 @@ int32_t doMinMaxHelper(SqlFunctionCtx* pCtx, int32_t isMinFunc) {
}
}
if (numOfElems == 0) {
GET_RES_INFO(pCtx)->isNullRes = 1;
numOfElems = 1;
}
_min_max_over:
return numOfElems;
}