Fix resolve joined table bug

This commit is contained in:
xianyu-w 2023-07-03 10:12:24 +00:00 committed by ob-robot
parent 94473eb935
commit 0f95a1cbef

View File

@ -4081,9 +4081,12 @@ int ObDMLResolver::transfer_to_inner_joined(const ParseNode &parse_node, JoinedT
temp_table->table_id_ = generate_table_id();
temp_table->type_ = TableItem::JOINED_TABLE;
temp_table->left_table_ = cur_table;
cur_table = temp_table;
if (OB_FAIL(join_infos_.push_back(ResolverJoinInfo(cur_table->table_id_)))) {
if (OB_FAIL(join_infos_.push_back(ResolverJoinInfo(temp_table->table_id_)))) {
LOG_WARN("fail to push back join information", K(ret));
} else if (OB_FAIL(temp_table->single_table_ids_.assign(cur_table->single_table_ids_))) {
LOG_WARN("failed to assign table ids", K(ret));
} else {
cur_table = temp_table;
}
}
}