Merge pull request #20127 from taosdata/fix/TD-22733
fix: percentile finalize wrong error code issue
This commit is contained in:
commit
f9188351d7
|
@ -1689,11 +1689,7 @@ int32_t percentileFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
|
|||
double v = 0;
|
||||
|
||||
tMemBucket* pMemBucket = ppInfo->pMemBucket;
|
||||
if (pMemBucket == NULL || pMemBucket->total == 0) { // check for null
|
||||
code = TSDB_CODE_FAILED;
|
||||
goto _fin_error;
|
||||
}
|
||||
|
||||
if (pMemBucket != NULL && pMemBucket->total > 0) { // check for null
|
||||
if (pCtx->numOfParams > 2) {
|
||||
char buf[512] = {0};
|
||||
size_t len = 1;
|
||||
|
@ -1737,6 +1733,7 @@ int32_t percentileFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
|
|||
tMemBucketDestroy(pMemBucket);
|
||||
return functionFinalize(pCtx, pBlock);
|
||||
}
|
||||
}
|
||||
|
||||
_fin_error:
|
||||
|
||||
|
|
Loading…
Reference in New Issue