Fix div expr precision deducing is not idempotent

This commit is contained in:
hezuojiao
2024-03-13 08:12:22 +00:00
committed by ob-robot
parent 17f7a2f819
commit a88b712c55
4 changed files with 116 additions and 0 deletions

View File

@ -96,6 +96,8 @@ int ObExprDiv::calc_result_type2(ObExprResType &type,
type.set_calc_scale(calc_scale);
}
}
type1.set_calc_accuracy(type1.get_accuracy());
type2.set_calc_accuracy(type2.get_accuracy());
if (type.is_decimal_int()) {
if (OB_UNLIKELY(PRECISION_UNKNOWN_YET == type.get_precision() ||
SCALE_UNKNOWN_YET == type.get_scale())) {