HappenLee commented on code in PR #49082:
URL: https://github.com/apache/doris/pull/49082#discussion_r2024645111
##########
be/src/vec/exprs/vexpr.cpp:
##########
@@ -371,20 +371,29 @@ Status VExpr::create_tree_from_thrift(const
std::vector<TExprNode>& nodes, int*
std::stack<std::pair<VExprSPtr, int>> s;
s.emplace(root, root_children);
while (!s.empty()) {
- auto& parent = s.top();
Review Comment:
better use Defer object to do the work.
```
Defer defer {[&] {
if (parent.second > 1) {
parent.second -= 1;
} else {
s.pop();
}
}};
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]