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

@ -62,6 +62,8 @@ inline int ObExprTimeDiff::calc_result_type2(
if (ob_is_enumset_tc(left.get_type())) {
left.set_calc_type(common::ObVarcharType);
scale = common::MAX_SCALE_FOR_TEMPORAL;
} else if (ob_is_real_type(left.get_type())) {
left.set_calc_type(common::ObNumberType);
}
if (ob_is_enumset_tc(right.get_type())) {
right.set_calc_type(common::ObVarcharType);