fix some outline bugs

This commit is contained in:
yinyj17
2023-06-07 08:12:26 +00:00
committed by ob-robot
parent 3a1911a16a
commit 65ebe32909
4 changed files with 3 additions and 22 deletions

View File

@ -615,6 +615,7 @@ OB_NOINLINE int ObMPQuery::process_with_tmp_context(ObSQLSessionInfo &session,
force_sync_resp,
async_resp_used,
need_disconnect);
ctx_.first_plan_hash_ = 0;
ctx_.first_outline_data_.reset();
ctx_.clear();
}

View File

@ -1703,8 +1703,6 @@ int ObTransformJoinElimination::eliminate_semi_join_self_foreign_key(ObDMLStmt *
if (OB_ISNULL(semi_info = semi_infos.at(i))) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected null", K(ret), K(semi_info));
} else if (OB_FAIL(preprocess_generate_right_table(*stmt, *semi_info))) {
LOG_WARN("failed to preprocess generate right table", K(ret));
} else if (OB_FAIL(eliminate_semi_join_self_key(stmt,
semi_info,
candi_conds,
@ -1734,23 +1732,6 @@ int ObTransformJoinElimination::eliminate_semi_join_self_foreign_key(ObDMLStmt *
return ret;
}
// flatten joined table in right table
int ObTransformJoinElimination::preprocess_generate_right_table(ObDMLStmt &stmt,
SemiInfo &semi_info)
{
int ret = OB_SUCCESS;
TableItem *right_table = NULL;
if (OB_ISNULL(right_table = stmt.get_table_item_by_id(semi_info.right_table_id_))) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected null", K(right_table), K(ret));
} else if (!right_table->is_generated_table()) {
/* do nothing */
} else if (OB_FAIL(ObTransformUtils::flatten_joined_table(right_table->ref_query_))) {
LOG_WARN("failed to faltten joined table", K(ret));
}
return ret;
}
int ObTransformJoinElimination::eliminate_semi_join_self_key(ObDMLStmt *stmt,
SemiInfo *semi_info,
ObIArray<ObRawExpr*> &conds,

View File

@ -431,8 +431,6 @@ private:
int left_join_can_be_eliminated(ObDMLStmt *stmt, TableItem *table, bool &can_be_eliminated);
int preprocess_generate_right_table(ObDMLStmt &stmt, SemiInfo &semi_info);
int eliminate_semi_join_self_key(ObDMLStmt *stmt,
SemiInfo *semi_info,
ObIArray<ObRawExpr*> &conds,

View File

@ -1565,7 +1565,8 @@ int ObTransformPredicateMoveAround::pushdown_into_set_stmt(ObSelectStmt *stmt,
LOG_WARN("assign preds failed", K(ret));
} else if (OB_FAIL(append(pushdown_preds, invalid_pushdown_preds))) {
LOG_WARN("failed to append no push down preds", K(ret));
} else if (pushdown_preds.count() != pushdown_preds_cnt
} else if ((pushdown_preds.count() != pushdown_preds_cnt
|| (stmt->is_set_stmt() && ObOptimizerUtil::find_item(transed_stmts_, stmt)))
&& OB_FAIL(add_var_to_array_no_dup(transed_stmts_, static_cast<ObDMLStmt*>(parent_stmt)))) {
LOG_WARN("append transed stmt failed", K(ret));
} else {/*do nothing*/}