Skip to content

Commit

Permalink
Merge pull request #4751 from taosdata/hotfix/TD-2583
Browse files Browse the repository at this point in the history
[TD-2583]<fix>:function min gets  result value zero  when column values contain NULL
  • Loading branch information
hjxilinx authored Dec 31, 2020
2 parents 2a53414 + ee602ff commit cbdabcd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/client/src/tscFunctionImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cbdabcd

Please sign in to comment.