提交 5df8d9c4 编写于 作者: T tj0 提交者: wangzelin.wzl

Comment USELESS CALL in ob_cnnt_by_pump_bfs.cpp

上级 85496aec
...@@ -150,7 +150,7 @@ int ObConnectByOpBFSPump::free_path_stack() ...@@ -150,7 +150,7 @@ int ObConnectByOpBFSPump::free_path_stack()
for (int64_t i = 0; OB_SUCC(ret) && i < connect_by_path_count_; ++i) { for (int64_t i = 0; OB_SUCC(ret) && i < connect_by_path_count_; ++i) {
if (pop_node.paths_.at(i).ptr() != NULL) { if (pop_node.paths_.at(i).ptr() != NULL) {
allocator_.free(pop_node.paths_.at(i).ptr()); allocator_.free(pop_node.paths_.at(i).ptr());
pop_node.paths_.at(i).make_empty_string(); pop_node.paths_.at(i).reset();
} }
} }
} }
...@@ -180,7 +180,7 @@ int ObConnectByOpBFSPump::free_pump_node_stack(ObIArray<PumpNode>& stack) ...@@ -180,7 +180,7 @@ int ObConnectByOpBFSPump::free_pump_node_stack(ObIArray<PumpNode>& stack)
if (pop_node.path_node_.paths_[i].ptr() != NULL) { if (pop_node.path_node_.paths_[i].ptr() != NULL) {
LOG_ERROR("unexpected path value"); LOG_ERROR("unexpected path value");
allocator_.free(pop_node.path_node_.paths_.at(i).ptr()); allocator_.free(pop_node.path_node_.paths_.at(i).ptr());
pop_node.path_node_.paths_.at(i).make_empty_string(); pop_node.path_node_.paths_.at(i).reset();
} }
} }
} }
...@@ -334,7 +334,7 @@ int ObConnectByOpBFSPump::add_path_stack(PathNode& path_node) ...@@ -334,7 +334,7 @@ int ObConnectByOpBFSPump::add_path_stack(PathNode& path_node)
for (int64_t i = 0; OB_SUCC(ret) && i < connect_by_path_count_; ++i) { for (int64_t i = 0; OB_SUCC(ret) && i < connect_by_path_count_; ++i) {
if (pop_node.paths_[i].ptr() != NULL) { if (pop_node.paths_[i].ptr() != NULL) {
allocator_.free(pop_node.paths_.at(i).ptr()); allocator_.free(pop_node.paths_.at(i).ptr());
pop_node.paths_.at(i).make_empty_string(); pop_node.paths_.at(i).reset();
} }
} }
if (0 == path_stack_.count()) { // current path_node is root node if (0 == path_stack_.count()) { // current path_node is root node
...@@ -501,7 +501,7 @@ int ObConnectByOpBFSPump::get_parent_path(int64_t idx, ObString& p_path) const ...@@ -501,7 +501,7 @@ int ObConnectByOpBFSPump::get_parent_path(int64_t idx, ObString& p_path) const
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
LOG_WARN("invalid path stack", K(node_cnt), K(ret)); LOG_WARN("invalid path stack", K(node_cnt), K(ret));
} else if (1 == node_cnt) { } else if (1 == node_cnt) {
p_path.make_empty_string(); p_path.reset();
} else if (idx >= path_stack_.at(node_cnt - 1).paths_.count()) { } else if (idx >= path_stack_.at(node_cnt - 1).paths_.count()) {
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
LOG_WARN("invalid path stack", K(idx), K(path_stack_.at(node_cnt - 1).paths_.count()), K(ret)); LOG_WARN("invalid path stack", K(idx), K(path_stack_.at(node_cnt - 1).paths_.count()), K(ret));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册