fix: histogram normalized can only be 0/1

This commit is contained in:
Ganlin Zhao 2022-05-07 14:29:50 +08:00
parent dd7cec4132
commit e2413a062c
1 changed files with 3 additions and 0 deletions

View File

@ -1964,6 +1964,9 @@ bool histogramFunctionSetup(SqlFunctionCtx *pCtx, SResultRowEntryInfo *pResultIn
}
char* binDesc = varDataVal(pCtx->param[2].param.pz);
int64_t normalized = pCtx->param[3].param.i;
if (normalized != 0 && normalized != 1) {
return false;
}
if (!getHistogramBinDesc(pInfo, binDesc, binType, (bool)normalized)) {
return false;
}