提交 568b45a8 编写于 作者: Z zl0 提交者: LINGuanRen

fix stmt compare bug

上级 ced4f997
......@@ -279,6 +279,7 @@ int ObStmtComparer::check_stmt_containment(
} else if (first_sel->is_set_stmt() || second_sel->is_set_stmt() || first_sel->has_recusive_cte() ||
second_sel->has_recusive_cte() || first_sel->has_hierarchical_query() ||
second_sel->has_hierarchical_query() || first_sel->is_contains_assignment() ||
first_sel->get_semi_info_size() > 0 || second_sel->get_semi_info_size() > 0 ||
second_sel->is_contains_assignment()) {
/*do nothing*/
} else if (first_sel->get_from_item_size() != second_sel->get_from_item_size()) {
......
......@@ -357,8 +357,13 @@ int ObTransformJoinElimination::create_missing_select_items(ObSelectStmt* source
for (int64_t i = 0; OB_SUCC(ret) && i < table_map.count(); i++) {
TableItem* temp_source_table = NULL;
TableItem* temp_target_table = NULL;
if (OB_ISNULL(temp_source_table = source_stmt->get_table_item(i)) ||
OB_ISNULL(temp_target_table = target_stmt->get_table_item(table_map.at(i)))) {
int64_t idx = table_map.at(i);
if (idx < 0 || idx >= target_stmt->get_table_size() ||
i >= source_stmt->get_table_size()) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpect table idx", K(ret));
} else if (OB_ISNULL(temp_source_table = source_stmt->get_table_item(i)) ||
OB_ISNULL(temp_target_table = target_stmt->get_table_item(idx))) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected null", K(temp_source_table), K(temp_target_table), K(ret));
} else if ((temp_source_table->is_basic_table() && temp_target_table->is_basic_table()) ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册