[scn] fix failure of mittest after refresh feature scn

This commit is contained in:
obdev
2022-11-28 01:46:42 +00:00
committed by ob-robot
parent 49a02f3304
commit 54b64a7263
1898 changed files with 255804 additions and 280809 deletions

View File

@ -247,13 +247,9 @@ int ObOptimizer::get_stmt_max_table_parallel_hint(ObDMLStmt &stmt,
int ret = OB_SUCCESS;
ObSEArray<ObSelectStmt*, 4> child_stmts;
ObQueryCtx *query_ctx = NULL;
int64_t cur_max_table_hint = ObGlobalHint::UNSET_PARALLEL;
if (OB_FAIL(stmt.get_stmt_hint().get_max_table_parallel(stmt, cur_max_table_hint))) {
LOG_WARN("failed to get max table parallel", K(ret));
} else if (OB_FAIL(stmt.get_child_stmts(child_stmts))) {
max_table_hint = std::max(max_table_hint, stmt.get_stmt_hint().get_max_table_parallel());
if (OB_FAIL(stmt.get_child_stmts(child_stmts))) {
LOG_WARN("failed to get child stmts", K(ret));
} else {
max_table_hint = std::max(max_table_hint, cur_max_table_hint);
}
for (int64_t i = 0; OB_SUCC(ret) && i < child_stmts.count(); i++) {
if (OB_ISNULL(child_stmts.at(i))) {
@ -293,11 +289,16 @@ int ObOptimizer::get_stmt_max_table_dop(ObDMLStmt &stmt,
table_item->is_link_table() ||
table_item->is_fake_cte_table() ||
table_item->is_joined_table()) {
} else if (table_item->is_temp_table()) {
if (OB_FAIL(child_stmts.push_back(table_item->ref_query_))) {
LOG_WARN("push back failed", K(ret));
}
} else if (table_item->is_generated_table()) {
/*do nothing*/
} else if (table_item->is_temp_table() ||
table_item->is_generated_table()) {
if (OB_ISNULL(table_item->ref_query_)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected null", K(ret));
} else if (OB_FAIL(SMART_CALL(get_stmt_max_table_dop(*table_item->ref_query_,
max_table_dop)))) {
LOG_WARN("failed to get stmt max table dop", K(ret));
} else { /*do nothing*/ }
} else {
uint64_t tids[OB_MAX_INDEX_PER_TABLE + 1];
int64_t index_count = OB_MAX_INDEX_PER_TABLE + 1;