specify collation compatible with non-character types

This commit is contained in:
betelgeu 2024-11-15 10:14:27 +00:00 committed by ob-robot
parent be196ef6b9
commit a6e0022fbe

View File

@ -286,6 +286,9 @@ int ObExprSetCollation::calc_result_type2(ObExprResType &type,
}
if (OB_SUCC(ret)) {
type1.set_calc_type(ObVarcharType);
if (!type1.is_string_type()) {
type1.set_calc_collation_type(type2.get_collation_type());
}
type2.set_calc_type(ObIntType);
}
return ret;