Address the issue of improper comparison due to mismatched data types on both sides of the IN expression.

This commit is contained in:
qingsuijiu
2024-06-28 12:23:58 +00:00
committed by ob-robot
parent 18bdc08688
commit e480f06bbe
2 changed files with 52 additions and 45 deletions

View File

@ -106,7 +106,8 @@ int ObExprCase::calc_result_typeN(ObExprResType &type,
types_stack[i].set_calc_meta(types_stack[i].get_obj_meta());
} else {
types_stack[i].set_calc_meta(type.get_obj_meta());
if (ObDecimalIntType == type.get_obj_meta().get_type()) {
if (ObDecimalIntType == type.get_obj_meta().get_type() ||
ob_is_double_type(type.get_obj_meta().get_type())) {
types_stack[i].set_calc_accuracy(type.get_accuracy());
}
}