github-actions[bot] commented on code in PR #27943:
URL: https://github.com/apache/doris/pull/27943#discussion_r1431047655


##########
be/src/vec/exec/join/vnested_loop_join_node.cpp:
##########
@@ -395,8 +397,8 @@ void VNestedLoopJoinNode::_add_tuple_is_null_column(Block* 
block) {
 }
 
 template <bool BuildSide, bool IsSemi>
-void VNestedLoopJoinNode::_finalize_current_phase(MutableBlock& mutable_block, 
size_t batch_size) {
-    auto& dst_columns = mutable_block.mutable_columns();
+void VNestedLoopJoinNode::_finalize_current_phase(Block& block, size_t 
batch_size) {

Review Comment:
   warning: function '_finalize_current_phase' has cognitive complexity of 74 
(threshold 50) [readability-function-cognitive-complexity]
   ```cpp
   void VNestedLoopJoinNode::_finalize_current_phase(Block& block, size_t 
batch_size) {
                             ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:403:** +1, including 
nesting penalty of 0, nesting level increased to 1
   ```cpp
       if constexpr (BuildSide) {
       ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:407:** +2, including 
nesting penalty of 1, nesting level increased to 2
   ```cpp
           for (; i < build_block_sz && column_size < batch_size; i++) {
           ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:407:** +1
   ```cpp
           for (; i < build_block_sz && column_size < batch_size; i++) {
                                     ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:417:** +3, including 
nesting penalty of 2, nesting level increased to 3
   ```cpp
               for (size_t j = 0; j < num_rows; j++) {
               ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:418:** +4, including 
nesting penalty of 3, nesting level increased to 4
   ```cpp
                   if constexpr (IsSemi) {
                   ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:419:** +5, including 
nesting penalty of 4, nesting level increased to 5
   ```cpp
                       if (cur_visited_flags[j]) {
                       ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:422:** +1, nesting level 
increased to 4
   ```cpp
                   } else {
                     ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:423:** +5, including 
nesting penalty of 4, nesting level increased to 5
   ```cpp
                       if (!cur_visited_flags[j]) {
                       ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:430:** +3, including 
nesting penalty of 2, nesting level increased to 3
   ```cpp
               for (size_t j = 0; j < _num_probe_side_columns; ++j) {
               ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:437:** +3, including 
nesting penalty of 2, nesting level increased to 3
   ```cpp
               for (size_t j = 0; j < _num_build_side_columns; ++j) {
               ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:439:** +4, including 
nesting penalty of 3, nesting level increased to 4
   ```cpp
                   if (!src_column.column->is_nullable() &&
                   ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:439:** +1
   ```cpp
                   if (!src_column.column->is_nullable() &&
                                                         ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:450:** +1, nesting level 
increased to 4
   ```cpp
                   } else {
                     ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:459:** +1, nesting level 
increased to 1
   ```cpp
       } else {
         ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:460:** +2, including 
nesting penalty of 1, nesting level increased to 2
   ```cpp
           if (!_is_mark_join) {
           ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:463:** +3, including 
nesting penalty of 2, nesting level increased to 3
   ```cpp
               for (int j = _left_block_start_pos;
               ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:465:** +4, including 
nesting penalty of 3, nesting level increased to 4
   ```cpp
                   if (_cur_probe_row_visited_flags[j] == IsSemi) {
                   ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:467:** +5, including 
nesting penalty of 4, nesting level increased to 5
   ```cpp
                       for (size_t i = 0; i < _num_probe_side_columns; ++i) {
                       ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:469:** +6, including 
nesting penalty of 5, nesting level increased to 6
   ```cpp
                           if (!src_column.column->is_nullable() && 
dst_columns[i]->is_nullable()) {
                           ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:469:** +1
   ```cpp
                           if (!src_column.column->is_nullable() && 
dst_columns[i]->is_nullable()) {
                                                                 ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:478:** +1, nesting level 
increased to 6
   ```cpp
                           } else {
                             ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:484:** +3, including 
nesting penalty of 2, nesting level increased to 3
   ```cpp
               if (new_size > column_size) {
               ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:485:** +4, including 
nesting penalty of 3, nesting level increased to 4
   ```cpp
                   for (size_t i = 0; i < _num_build_side_columns; ++i) {
                   ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:491:** +1, nesting level 
increased to 2
   ```cpp
           } else {
             ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:495:** +3, including 
nesting penalty of 2, nesting level increased to 3
   ```cpp
               for (int j = _left_block_start_pos;
               ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:499:** +3, including 
nesting penalty of 2, nesting level increased to 3
   ```cpp
               for (size_t i = 0; i < _num_probe_side_columns; ++i) {
               ^
   ```
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:505:** +3, including 
nesting penalty of 2, nesting level increased to 3
   ```cpp
               for (size_t i = 0; i < _num_build_side_columns; ++i) {
               ^
   ```
   
   </details>
   



##########
be/src/vec/exec/join/vnested_loop_join_node.cpp:
##########
@@ -395,8 +397,8 @@ void VNestedLoopJoinNode::_add_tuple_is_null_column(Block* 
block) {
 }
 
 template <bool BuildSide, bool IsSemi>
-void VNestedLoopJoinNode::_finalize_current_phase(MutableBlock& mutable_block, 
size_t batch_size) {
-    auto& dst_columns = mutable_block.mutable_columns();
+void VNestedLoopJoinNode::_finalize_current_phase(Block& block, size_t 
batch_size) {

Review Comment:
   warning: function '_finalize_current_phase' exceeds recommended 
size/complexity thresholds [readability-function-size]
   ```cpp
   void VNestedLoopJoinNode::_finalize_current_phase(Block& block, size_t 
batch_size) {
                             ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/vec/exec/join/vnested_loop_join_node.cpp:399:** 114 lines including 
whitespace and comments (threshold 80)
   ```cpp
   void VNestedLoopJoinNode::_finalize_current_phase(Block& block, size_t 
batch_size) {
                             ^
   ```
   
   </details>
   



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to