Fix decimal sum precision deduce not idempotent

This commit is contained in:
hezuojiao
2024-05-28 13:54:12 +00:00
committed by ob-robot
parent 47a371d554
commit db82be8c7e
4 changed files with 13 additions and 2 deletions

View File

@ -6265,6 +6265,11 @@ int ObStaticEngineCG::generate_spec(
ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected output type of subplan scan", K(ret), K(from->get_result_type()),
K(col_expr->get_result_type()));
} else if (ob_is_decimal_int_tc(from_type) &&
ObRawExprUtils::decimal_int_need_cast(from->get_accuracy(), col_expr->get_accuracy())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("decimal int datum meta is not match", K(ret), K(from->get_accuracy()),
K(col_expr->get_accuracy()));
}
OZ(generate_rt_expr(*from, rt_expr));
OZ(spec.projector_.push_back(rt_expr));