fix aggregate scale for temporal type bug

This commit is contained in:
st0
2022-03-04 11:45:50 +08:00
committed by LINxiansheng
parent 5022a0609f
commit f0d7d9d626
3 changed files with 6 additions and 7 deletions

View File

@ -98,8 +98,8 @@ int ObExprNvl::calc_result_type2(
} else {
type.set_accuracy(type2.get_accuracy());
}
ObScale scale1 = type1.get_scale();
ObScale scale2 = type2.get_scale();
ObScale scale1 = type1.is_null() ? 0 : type1.get_scale();
ObScale scale2 = type2.is_null() ? 0 : type2.get_scale();
if (-1 != scale1 && -1 != scale2) {
type.set_scale(static_cast<ObScale>(max(scale1, scale2)));
} else {