fix print type scale bug

This commit is contained in:
st0
2021-09-13 17:45:22 +08:00
committed by wangzelin.wzl
parent 65e00203c5
commit c19f7ea941
25 changed files with 22507 additions and 22248 deletions

View File

@ -8272,7 +8272,7 @@ int ob_obj_accuracy_check_only(const ObAccuracy& accuracy, const ObCollationType
}
int ob_obj_to_ob_time_with_date(
const ObObj& obj, const ObTimeZoneInfo* tz_info, ObTime& ob_time, bool is_dayofmonth /*false*/)
const ObObj& obj, const ObTimeZoneInfo* tz_info, ObTime& ob_time, const int64_t cur_ts_value, bool is_dayofmonth /*false*/)
{
int ret = OB_SUCCESS;
switch (obj.get_type_class()) {
@ -8296,6 +8296,15 @@ int ob_obj_to_ob_time_with_date(
break;
}
case ObTimeTC: {
int64_t datetime_val = 0;
if (OB_FAIL(
ObTimeConverter::time_to_datetime(obj.get_time(), cur_ts_value, NULL, datetime_val, ObDateTimeType))) {
LOG_WARN("time_to_datetime failed", K(ret), K(obj), K(cur_ts_value));
} else if (OB_FAIL(ObTimeConverter::datetime_to_ob_time(datetime_val, NULL, ob_time))) {
LOG_WARN("datetime to time failed", K(ret));
}
break;
ret = ObTimeConverter::time_to_ob_time(obj.get_time(), ob_time);
break;
}