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

@ -1127,8 +1127,7 @@ int ObExprOperator::aggregate_temporal_accuracy_for_merge(
}
}
if (OB_UNLIKELY(scale < 0)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected scale.", K(ret), K(scale));
type.set_scale(ObAccuracy::MAX_ACCURACY2[is_oracle_mode()][type.get_type()].get_scale());
} else {
type.set_scale(scale);
}