Improve Second and Microsecond function

This commit is contained in:
obdev
2022-11-04 11:40:48 +00:00
committed by wangzelin.wzl
parent 1889cad1a3
commit 4bdf785213
2 changed files with 38 additions and 5 deletions

View File

@ -337,8 +337,9 @@ int ObExprMonthName::calc_result_type1(ObExprResType &type,
type.set_collation_level(CS_LEVEL_IMPLICIT);
common::ObObjTypeClass tc1 = ob_obj_type_class(type1.get_type());
if (ob_is_enumset_tc(type1.get_type())) {
if (common::ObEnumSetTC == tc1) {
type1.set_calc_type(common::ObVarcharType);
type1.set_calc_collation_type(cs_type);
} else if ((common::ObFloatTC == tc1) || (common::ObDoubleTC == tc1)) {
type1.set_calc_type(common::ObIntType);
}