提交 22dbc4c6 编写于 作者: G Ganlin Zhao

[TD-11222]<feature>: Histogram function

上级 cde7e97d
......@@ -5013,7 +5013,11 @@ static void histogram_function(SQLFunctionCtx *pCtx) {
if (pRes->normalized) {
for (int32_t b = 0; b < pRes->numOfBins; ++b) {
if (totalElems != 0) {
pRes->orderedBins[b].count = pRes->orderedBins[b].count / (double)totalElems;
} else {
pRes->orderedBins[b].count = 0;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册