Merge pull request #4751 from taosdata/hotfix/TD-2583
[TD-2583]<fix>:function min gets result value zero when column values contain NULL
This commit is contained in:
commit
cbdabcd561
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue