Fixed comparison of double types with different scales

This commit is contained in:
hezuojiao
2024-07-02 13:05:58 +00:00
committed by ob-robot
parent 657a8a0b0f
commit 1e6b6ac34c
3 changed files with 7 additions and 1 deletions

View File

@ -6472,6 +6472,8 @@ int ObRelationalExprOperator::cg_datum_cmp_expr(const ObRawExpr &raw_expr,
const ObCollationType cs_type = rt_expr.args_[0]->datum_meta_.cs_type_;
if (ObDatumFuncs::is_string_type(input_type1) && ObDatumFuncs::is_string_type(input_type2)) {
CK(rt_expr.args_[0]->datum_meta_.cs_type_ == rt_expr.args_[1]->datum_meta_.cs_type_);
} else if (ob_is_double_tc(input_type1) && ob_is_double_tc(input_type2)) {
CK(rt_expr.args_[0]->datum_meta_.scale_ == rt_expr.args_[1]->datum_meta_.scale_);
}
if (OB_SUCC(ret)) {
rt_expr.eval_func_ = ObExprCmpFuncsHelper::get_eval_expr_cmp_func(