提交 763f702f 编写于 作者: G Ganlin Zhao

fix assert in builtims.c

上级 85eba361
......@@ -1009,7 +1009,10 @@ static bool validateHistogramBinDesc(char* binDescStr, int8_t binType, char* err
intervals[0] = -INFINITY;
intervals[numOfBins - 1] = INFINITY;
// in case of desc bin orders, -inf/inf should be swapped
ASSERT(numOfBins >= 4);
if (numOfBins < 4) {
return false;
}
if (intervals[1] > intervals[numOfBins - 2]) {
TSWAP(intervals[0], intervals[numOfBins - 1]);
}
......@@ -1354,7 +1357,7 @@ static int32_t translateCsum(SFunctionNode* pFunc, char* pErrBuf, int32_t len) {
} else if (IS_FLOAT_TYPE(colType)) {
resType = TSDB_DATA_TYPE_DOUBLE;
} else {
ASSERT(0);
return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册