[CP] [CP] Fix view synonym bug

This commit is contained in:
xianyu-w
2024-02-10 11:32:36 +00:00
committed by ob-robot
parent b2f4717f20
commit 7829c9c8dc
27 changed files with 48 additions and 54 deletions

View File

@ -708,6 +708,7 @@ int ObTransformSimplifySet::add_constraints_by_idx(common::ObIArray<int64_t> &co
op_expr))) {
LOG_WARN("fail to build constaint expr", K(ret));
} else if (OB_ISNULL(op_expr)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get null pointer", K(ret));
} else if (OB_FAIL(op_expr->formalize(ctx_->session_info_))) {
LOG_WARN("fail to formalize expr", K(ret));
@ -766,6 +767,7 @@ int ObTransformSimplifySet::replace_set_stmt_with_child_stmt(ObSelectStmt *&pare
if (OB_FAIL(ObTransformUtils::create_stmt_with_generated_table(ctx_, child_stmt, view_stmt))) {
LOG_WARN("fail to create view with generated table", K(ret));
} else if (OB_ISNULL(view_stmt)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("view table is null", K(ret));
} else if (OB_FAIL(add_order_by(view_stmt, parent_stmt))) {
// set child's order by to view.