using same assign exprs in join first rewrite for update stmt

This commit is contained in:
jingtaoye35
2024-02-09 12:43:12 +00:00
committed by ob-robot
parent 4811f30f9a
commit cfae8974c1
2 changed files with 5 additions and 3 deletions

View File

@ -398,7 +398,9 @@ int ObRawExpr::deduce_type(const ObSQLSessionInfo *session_info,
ObRawExprDeduceType expr_deducer(session_info, solidify_session_vars, local_vars, local_var_id);
expr_deducer.set_expr_factory(expr_factory_);
if (OB_FAIL(expr_deducer.deduce(*this))) {
if (session_info->is_varparams_sql_prepare()) {
if (session_info->is_varparams_sql_prepare() &&
OB_ERR_INVALID_COLUMN_NUM != ret &&
OB_ERR_TOO_MANY_VALUES != ret) {
ret = OB_SUCCESS;
LOG_TRACE("ps prepare phase ignores type deduce error");
} else {

View File

@ -1301,8 +1301,8 @@ int ObTransformAggrSubquery::get_trans_param(ObDMLStmt &stmt,
}
} else if (stmt.is_update_stmt()) {
ObUpdateStmt &upd_stmt = static_cast<ObUpdateStmt &>(stmt);
if (OB_FAIL(upd_stmt.get_assign_values(pre_group_by_exprs, true))) {
LOG_WARN("failed to get assign values", K(ret));
if (OB_FAIL(ObTransformUtils::get_post_join_exprs(&stmt, pre_group_by_exprs, true))) {
LOG_WARN("failed to get post join exprs", K(ret));
}
}
int64_t pre_count = pre_group_by_exprs.count();