未验证 提交 67b1a08e 编写于 作者: Z zhouhuahui 提交者: GitHub

Update ob_expr_remainder.cpp (#693)

resolve issue#618
上级 11ba7bf2
......@@ -281,14 +281,14 @@ int ObExprRemainder::calc_remainder_expr(const ObExpr& expr, ObEvalCtx& ctx, ObD
}
}
} else if (ObFloatTC == tc) {
if (0 == right->get_float()) {
if ((right->get_float() < 1e-6 && right->get_float() >= 0.0) || (right->get_float() > -(1e-6) && right->get_float() <= 0.0)) {
ret = OB_ERR_DIVISOR_IS_ZERO;
LOG_WARN("divisor is equal to zero on oracle mode", K(ret), K(right->get_float()));
} else {
res.set_float(remainder(left->get_float(), right->get_float()));
}
} else if (ObDoubleTC == tc) {
if (0 == right->get_double()) {
if ((right->get_double() < 1e-15 && right->get_double() >= 0.0) || (right->get_double() > -(1e-15) && right->get_double() <= 0.0)) {
ret = OB_ERR_DIVISOR_IS_ZERO;
LOG_WARN("divisor is equal to zero on oracle mode", K(ret), K(right->get_double()));
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册