diff --git a/src/client/src/tscFunctionImpl.c b/src/client/src/tscFunctionImpl.c index 22240efe1417ba9e1715de8787154c47e5f4ce09..3a01a9b281d72cba832229576eebcd3e58984a6a 100644 --- a/src/client/src/tscFunctionImpl.c +++ b/src/client/src/tscFunctionImpl.c @@ -921,6 +921,10 @@ static void minMax_function(SQLFunctionCtx *pCtx, char *pOutput, int32_t isMin, *notNullElems = pCtx->size - pCtx->preAggVals.statis.numOfNull; assert(*notNullElems >= 0); + if (*notNullElems == 0){ + return; + } + void * tval = NULL; int16_t index = 0;