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:
haojun Liao 2020-12-31 14:34:49 +08:00 committed by GitHub
commit cbdabcd561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -921,6 +921,10 @@ static void minMax_function(SQLFunctionCtx *pCtx, char *pOutput, int32_t isMin,
*notNullElems = pCtx->size - pCtx->preAggVals.statis.numOfNull; *notNullElems = pCtx->size - pCtx->preAggVals.statis.numOfNull;
assert(*notNullElems >= 0); assert(*notNullElems >= 0);
if (*notNullElems == 0){
return;
}
void * tval = NULL; void * tval = NULL;
int16_t index = 0; int16_t index = 0;