github-actions[bot] commented on code in PR #27397: URL: https://github.com/apache/doris/pull/27397#discussion_r1402979560
########## be/src/vec/exec/join/process_hash_table_probe_impl.h: ########## @@ -412,17 +199,17 @@ Status ProcessHashTableProbe<JoinOpType, Parent>::do_process(HashTableType& hash output_block->swap(mutable_block.to_block()); if constexpr (with_other_conjuncts) { - return do_other_join_conjuncts(output_block, is_mark_join, multi_matched_output_row_count, - is_the_last_sub_block); + return do_other_join_conjuncts(output_block, is_mark_join, is_the_last_sub_block, + hash_table_ctx.hash_table->get_visited()); } return Status::OK(); } template <int JoinOpType, typename Parent> Status ProcessHashTableProbe<JoinOpType, Parent>::do_other_join_conjuncts( Review Comment: warning: function 'do_other_join_conjuncts' has cognitive complexity of 79 (threshold 50) [readability-function-cognitive-complexity] ```cpp Status ProcessHashTableProbe<JoinOpType, Parent>::do_other_join_conjuncts( ^ ``` <details> <summary>Additional context</summary> **be/src/vec/exec/join/process_hash_table_probe_impl.h:214:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if (!row_count) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:223:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp RETURN_IF_ERROR(VExprContext::execute_conjuncts(_parent->_other_join_conjuncts, nullptr, ^ ``` **be/src/common/status.h:523:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:223:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp RETURN_IF_ERROR(VExprContext::execute_conjuncts(_parent->_other_join_conjuncts, nullptr, ^ ``` **be/src/common/status.h:525:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:238:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if constexpr (JoinOpType == TJoinOp::LEFT_OUTER_JOIN || ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:247:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp for (int i = 0; i < row_count; ++i) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:251:** +1 ```cpp null_map_data[i] = !join_hit || !other_hit; ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:253:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (!join_hit) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:255:** +1, nesting level increased to 3 ```cpp } else { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:258:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (filter_map[i]) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:263:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp for (size_t i = 0; i < row_count; ++i) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:264:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (filter_map[i]) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:266:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp if constexpr (JoinOpType == TJoinOp::FULL_OUTER_JOIN) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:272:** +1, nesting level increased to 1 ```cpp } else if constexpr (JoinOpType == TJoinOp::LEFT_ANTI_JOIN || ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:278:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (is_mark_join) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:284:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp for (size_t i = 0; i < row_count; ++i) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:286:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp if constexpr (JoinOpType != TJoinOp::LEFT_SEMI_JOIN) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:287:** +5, including nesting penalty of 4, nesting level increased to 5 ```cpp if (!_build_indexs[i]) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:294:** +1, nesting level increased to 2 ```cpp } else { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:295:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp for (size_t i = 0; i < row_count; ++i) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:296:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp if (filter_column_ptr[i]) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:297:** +5, including nesting penalty of 4, nesting level increased to 5 ```cpp if constexpr (JoinOpType == TJoinOp::LEFT_SEMI_JOIN) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:300:** +1, nesting level increased to 5 ```cpp } else { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:301:** +6, including nesting penalty of 5, nesting level increased to 6 ```cpp if (_build_indexs[i]) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:304:** +1, nesting level increased to 6 ```cpp } else { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:308:** +1, nesting level increased to 4 ```cpp } else { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:315:** +1, nesting level increased to 1 ```cpp } else if constexpr (JoinOpType == TJoinOp::RIGHT_SEMI_JOIN || ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:317:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp for (int i = 0; i < row_count; ++i) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:320:** +1, nesting level increased to 1 ```cpp } else if constexpr (JoinOpType == TJoinOp::RIGHT_OUTER_JOIN) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:322:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp for (int i = 0; i < row_count; ++i) { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:329:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if constexpr (JoinOpType == TJoinOp::RIGHT_SEMI_JOIN || ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:332:** +1, nesting level increased to 1 ```cpp } else { ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:333:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if constexpr (JoinOpType == TJoinOp::LEFT_SEMI_JOIN || ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:338:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp RETURN_IF_ERROR(Block::filter_block(output_block, result_column_id, ^ ``` **be/src/common/status.h:523:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:339:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp is_mark_join ? output_block->columns() : orig_columns)); ^ ``` **be/src/vec/exec/join/process_hash_table_probe_impl.h:338:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(Block::filter_block(output_block, result_column_id, ^ ``` **be/src/common/status.h:525:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` </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