fix outline fail:eliminate_join&predicate_move_around
This commit is contained in:
@ -1114,10 +1114,8 @@ int ObTransformJoinElimination::do_eliminate_left_outer_join(ObDMLStmt *stmt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (OB_FAIL(ret)) {
|
if (OB_FAIL(ret)) {
|
||||||
} else if (OB_FAIL(construct_eliminated_tables(stmt,
|
} else if (OB_FAIL(construct_eliminated_table(stmt, right_table, trans_tables))) {
|
||||||
right_table_items,
|
LOG_WARN("failed to construct eliminated table", K(ret));
|
||||||
trans_tables))) {
|
|
||||||
LOG_WARN("failed to construct eliminated tables", K(ret));
|
|
||||||
} else if (OB_FAIL(stmt->remove_table_info(right_table_items))) {
|
} else if (OB_FAIL(stmt->remove_table_info(right_table_items))) {
|
||||||
LOG_WARN("failed to remove table info", K(ret));
|
LOG_WARN("failed to remove table info", K(ret));
|
||||||
} else if (OB_FAIL(stmt->replace_relation_exprs(from_exprs, to_exprs))) {
|
} else if (OB_FAIL(stmt->replace_relation_exprs(from_exprs, to_exprs))) {
|
||||||
|
|||||||
@ -1171,7 +1171,6 @@ int ObTransformPredicateMoveAround::pushdown_predicates(
|
|||||||
LOG_WARN("failed to check transform happened", K(ret));
|
LOG_WARN("failed to check transform happened", K(ret));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
typedef ObSEArray<ObSEArray<ObRawExpr*, 16>, 4> PredsArray;
|
typedef ObSEArray<ObSEArray<ObRawExpr*, 16>, 4> PredsArray;
|
||||||
SMART_VAR(PredsArray, all_old_preds) {
|
SMART_VAR(PredsArray, all_old_preds) {
|
||||||
@ -1360,15 +1359,17 @@ int ObTransformPredicateMoveAround::check_conds_deduced(const ObIArray<ObRawExpr
|
|||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
if (!is_happened || !real_happened_) {
|
if (!is_happened || !real_happened_) {
|
||||||
bool happened = false;
|
bool happened = false;
|
||||||
for (int64_t i = 0; OB_SUCC(ret) && !happened && i < new_conditions.count(); ++i) {
|
uint64_t new_conditions_count = new_conditions.count();
|
||||||
if (!ObPredicateDeduce::find_equal_expr(old_conditions, new_conditions.at(i))) {
|
uint64_t old_conditions_count = old_conditions.count();
|
||||||
|
if (new_conditions_count != old_conditions_count) {
|
||||||
|
happened = true;
|
||||||
|
} else {
|
||||||
|
for (int64_t i = 0; OB_SUCC(ret) && !happened && i < new_conditions_count; ++i) {
|
||||||
|
if (!ObPredicateDeduce::find_equal_expr(old_conditions, new_conditions.at(i)) ||
|
||||||
|
!ObPredicateDeduce::find_equal_expr(new_conditions, old_conditions.at(i))) {
|
||||||
happened = true;
|
happened = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int64_t i = 0; OB_SUCC(ret) && !happened && i < old_conditions.count(); ++i) {
|
|
||||||
if (!ObPredicateDeduce::find_equal_expr(new_conditions, old_conditions.at(i))) {
|
|
||||||
happened = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (OB_SUCC(ret) && happened) {
|
if (OB_SUCC(ret) && happened) {
|
||||||
is_happened = true;
|
is_happened = true;
|
||||||
@ -2643,6 +2644,8 @@ int ObTransformPredicateMoveAround::pushdown_semi_info_right_filter(ObDMLStmt *s
|
|||||||
right_table,
|
right_table,
|
||||||
&right_filters))) {
|
&right_filters))) {
|
||||||
LOG_WARN("failed to create view with table", K(ret));
|
LOG_WARN("failed to create view with table", K(ret));
|
||||||
|
} else {
|
||||||
|
real_happened_ = true;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user