HappenLee commented on code in PR #16126:
URL: https://github.com/apache/doris/pull/16126#discussion_r1091576685
##########
be/src/vec/exec/vset_operation_node.cpp:
##########
@@ -239,13 +239,22 @@ Status
VSetOperationNode<is_intersect>::prepare(RuntimeState* state) {
_pull_timer = ADD_TIMER(runtime_profile(), "PullTime");
// Prepare result expr lists.
+ vector<bool> nullable_flags;
+ nullable_flags.resize(_child_expr_lists[0].size(), false);
for (int i = 0; i < _child_expr_lists.size(); ++i) {
+ int j = 0;
+ for (auto ctx : _child_expr_lists[i]) {
+ nullable_flags[j] = nullable_flags[j] ||
ctx->root()->is_nullable();
+ ++j;
+ }
RETURN_IF_ERROR(VExpr::prepare(_child_expr_lists[i], state,
child(i)->row_desc()));
}
-
+ int n = 0;
for (auto ctx : _child_expr_lists[0]) {
- _build_not_ignore_null.push_back(ctx->root()->is_nullable());
Review Comment:
save to upper
##########
be/src/vec/exec/vset_operation_node.cpp:
##########
@@ -239,13 +239,22 @@ Status
VSetOperationNode<is_intersect>::prepare(RuntimeState* state) {
_pull_timer = ADD_TIMER(runtime_profile(), "PullTime");
// Prepare result expr lists.
+ vector<bool> nullable_flags;
+ nullable_flags.resize(_child_expr_lists[0].size(), false);
for (int i = 0; i < _child_expr_lists.size(); ++i) {
+ int j = 0;
+ for (auto ctx : _child_expr_lists[i]) {
Review Comment:
better directly use ```for(int j = 0; j < _child_expr_lists[i].size()```
##########
be/src/vec/exec/vset_operation_node.cpp:
##########
@@ -239,13 +239,22 @@ Status
VSetOperationNode<is_intersect>::prepare(RuntimeState* state) {
_pull_timer = ADD_TIMER(runtime_profile(), "PullTime");
// Prepare result expr lists.
+ vector<bool> nullable_flags;
+ nullable_flags.resize(_child_expr_lists[0].size(), false);
for (int i = 0; i < _child_expr_lists.size(); ++i) {
+ int j = 0;
+ for (auto ctx : _child_expr_lists[i]) {
Review Comment:
better directly use ```for(int j = 0; j < _child_expr_lists[i].size()```
--
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]