This commit is contained in:
Ganlin Zhao 2022-06-07 19:30:49 +08:00
parent 53ee89a505
commit 367af0ec30
2 changed files with 2 additions and 2 deletions

View File

@ -1243,7 +1243,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
.classification = FUNC_MGT_AGG_FUNC,
.translateFunc = translateApercentileMerge,
.getEnvFunc = getApercentileFuncEnv,
.initFunc = dummyInit,
.initFunc = functionSetup,
.processFunc = apercentileFunctionMerge,
.finalizeFunc = apercentileFinalize
},

View File

@ -2083,7 +2083,7 @@ int32_t apercentileFunctionMerge(SqlFunctionCtx* pCtx) {
}
pInfo->algo = pInputInfo->algo;
if (pInput->algo == APERCT_ALGO_TDIGEST) {
if (pInfo->algo == APERCT_ALGO_TDIGEST) {
} else {
buildHistogramInfo(pInputInfo);
if (pInputInfo->pHisto->numOfElems <= 0) {