You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/12/07 14:48:31 UTC

[GitHub] [doris] HappenLee opened a new pull request, #14911: [Refactor](NLJ) refactor the nested loop join node

HappenLee opened a new pull request, #14911:
URL: https://github.com/apache/doris/pull/14911

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [ ] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [ ] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [ ] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] yiguolei merged pull request #14911: [Refactor](NLJ) refactor the nested loop join node

Posted by GitBox <gi...@apache.org>.
yiguolei merged PR #14911:
URL: https://github.com/apache/doris/pull/14911


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #14911: [Refactor](NLJ) refactor the nested loop join node

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14911:
URL: https://github.com/apache/doris/pull/14911#issuecomment-1342052705

   PR approved by at least one committer and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #14911: [Refactor](NLJ) refactor the nested loop join node

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14911:
URL: https://github.com/apache/doris/pull/14911#issuecomment-1342285377

   PR approved by at least one committer and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #14911: [Refactor](NLJ) refactor the nested loop join node

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14911:
URL: https://github.com/apache/doris/pull/14911#issuecomment-1341081572

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] hello-stephen commented on pull request #14911: [Refactor](NLJ) refactor the nested loop join node

Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #14911:
URL: https://github.com/apache/doris/pull/14911#issuecomment-1341411279

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 35.44 seconds
    load time: 457 seconds
    storage size: 17123356328 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221207183954_clickbench_pr_59709.html


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on a diff in pull request #14911: [Refactor](NLJ) refactor the nested loop join node

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on code in PR #14911:
URL: https://github.com/apache/doris/pull/14911#discussion_r1042892680


##########
be/src/vec/exec/join/vnested_loop_join_node.cpp:
##########
@@ -682,4 +563,53 @@ void VNestedLoopJoinNode::_release_mem() {
     _tuple_is_null_right_flag_column = nullptr;
 }
 
+Status VNestedLoopJoinNode::pull(RuntimeState* state, vectorized::Block* block, bool* eos) {
+    if (_is_output_left_side_only) {
+        RETURN_IF_ERROR(_build_output_block(&_left_block, block));
+        *eos = _left_side_eos;
+        _need_more_input_data = !_left_side_eos;
+    } else {
+        *eos = _match_all_build
+                       ? _output_null_idx_build_side == _build_blocks.size() && _matched_rows_done
+                       : _matched_rows_done;
+
+        {
+            Block tmp_block = _join_block;
+            _add_tuple_is_null_column(&tmp_block);
+            {
+                SCOPED_TIMER(_join_filter_timer);
+                RETURN_IF_ERROR(VExprContext::filter_block(_vconjunct_ctx_ptr, &tmp_block,
+                                                           tmp_block.columns()));
+            }
+            RETURN_IF_ERROR(_build_output_block(&tmp_block, block));
+            _reset_tuple_is_null_column();
+        }
+        _join_block.clear_column_data();
+
+        if (!(*eos) and !_need_more_input_data) {
+            auto func = [&](auto&& join_op_variants, auto set_build_side_flag,
+                            auto set_probe_side_flag) {
+                return _generate_join_block_data<std::decay_t<decltype(join_op_variants)>,
+                                                 set_build_side_flag, set_probe_side_flag>(
+                        state, join_op_variants);
+            };
+            RETURN_IF_ERROR(std::visit(func, _join_op_variants,
+                                       make_bool_variant(_match_all_build || _is_right_semi_anti),
+                                       make_bool_variant(_match_all_probe || _is_left_semi_anti)));
+        }
+    }
+
+    reached_limit(block, eos);
+    return Status::OK();
+}
+
+bool VNestedLoopJoinNode::need_more_input_data() const {
+    return _need_more_input_data;
+}
+
+void VNestedLoopJoinNode::release_resource(doris::RuntimeState* state) {
+    VExpr::close(_filter_src_expr_ctxs, state);
+    if (_vjoin_conjunct_ptr) (*_vjoin_conjunct_ptr)->close(state);

Review Comment:
   warning: statement should be inside braces [readability-braces-around-statements]
   
   ```suggestion
       if (_vjoin_conjunct_ptr) { (*_vjoin_conjunct_ptr)->close(state);
   }
   ```
   



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #14911: [Refactor](NLJ) refactor the nested loop join node

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14911:
URL: https://github.com/apache/doris/pull/14911#issuecomment-1342052739

   PR approved by anyone and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org