[CP] Disable view merge which generate stmt with more than 10 tables
This commit is contained in:
@ -348,6 +348,10 @@ int ObTransformGroupByPullup::check_groupby_pullup_validity(ObDMLStmt *stmt,
|
||||
OPT_TRACE("view has rand expr, can not transform");
|
||||
} else if (OB_FALSE_IT(helper.need_merge_ = (NULL != myhint
|
||||
&& myhint->enable_group_by_pull_up(ctx_->src_qb_name_)))) {
|
||||
} else if (!helper.need_merge_ && stmt->get_table_size() > 1 && sub_stmt->get_table_size() > 1 &&
|
||||
stmt->get_table_size() + sub_stmt->get_table_size() - 1 > 10) {
|
||||
// More than 10 tables may result in the inability to enumerate a valid join order.
|
||||
OPT_TRACE("Too Many Table Items");
|
||||
} else if (OB_FAIL(valid_views.push_back(helper))) {
|
||||
LOG_WARN("failed to push back group stmt index", K(ret));
|
||||
} else {
|
||||
|
||||
@ -530,6 +530,11 @@ int ObTransformViewMerge::check_basic_validity(ObDMLStmt *parent_stmt,
|
||||
|| child_stmt->is_values_table_query()) {
|
||||
can_be = false;
|
||||
OPT_TRACE("not a valid view");
|
||||
} else if (!force_merge && parent_stmt->get_table_size() > 1 && child_stmt->get_table_size() > 1 &&
|
||||
parent_stmt->get_table_size() + child_stmt->get_table_size() - 1 > 10) {
|
||||
// More than 10 tables may result in the inability to enumerate a valid join order.
|
||||
can_be = false;
|
||||
OPT_TRACE("Too Many Table Items");
|
||||
} else if (OB_FAIL(ObTransformUtils::check_has_assignment(*child_stmt, has_assignment))) {
|
||||
LOG_WARN("check has assignment failed", K(ret));
|
||||
} else if (has_assignment) {
|
||||
|
||||
Reference in New Issue
Block a user