cherry-pick bugfix from 3.1 to open source branch

This commit is contained in:
obdev
2021-07-14 17:48:15 +08:00
committed by wangzelin.wzl
parent 131c2cf658
commit a997b23808
19 changed files with 14233 additions and 14190 deletions

View File

@ -65,13 +65,12 @@ inline int ObExprDateFormat::calc_result_type2(
// for enum or set obj, we need calc type
if (ob_is_enum_or_set_type(date.get_type())) {
date.set_calc_type(common::ObVarcharType);
} else if (ob_is_double_tc(date.get_type()) || ob_is_float_tc(date.get_type())) {
date.set_calc_type(common::ObNumberType);
}
if (ob_is_enum_or_set_type(format.get_type())) {
format.set_calc_type(common::ObVarcharType);
}
if (ob_is_double_tc(date.get_type()) || ob_is_float_tc(date.get_type()) || ob_is_number_tc(date.get_type())) {
date.set_calc_type(common::ObVarcharType);
}
}
return ret;