github-actions[bot] commented on code in PR #41991: URL: https://github.com/apache/doris/pull/41991#discussion_r1803334504
########## be/src/pipeline/exec/spill_sort_source_operator.cpp: ########## @@ -81,11 +81,12 @@ Status SpillSortLocalState::initiate_merge_sort_spill_streams(RuntimeState* stat auto spill_func = [this, state, query_id, &parent] { Review Comment: warning: lambda has cognitive complexity of 52 (threshold 50) [readability-function-cognitive-complexity] ```cpp auto spill_func = [this, state, query_id, &parent] { ^ ``` <details> <summary>Additional context</summary> **be/src/pipeline/exec/spill_sort_source_operator.cpp:102:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp while (!state->is_cancelled()) { ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:109:** nesting level increased to 2 ```cpp SCOPED_TIMER(Base::_spill_recover_time); ^ ``` **be/src/util/runtime_profile.h:67:** expanded from macro 'SCOPED_TIMER' ```cpp #define SCOPED_TIMER(c) ScopedTimer<MonotonicStopWatch> MACRO_CONCAT(SCOPED_TIMER, __COUNTER__)(c) ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:114:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp RETURN_IF_ERROR(status); ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:114:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(status); ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:117:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (_shared_state->sorted_streams.empty()) { ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:126:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp RETURN_IF_ERROR(status); ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:126:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(status); ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:131:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp while (!eos && !state->is_cancelled()) { ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:131:** +1 ```cpp while (!eos && !state->is_cancelled()) { ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:134:** nesting level increased to 3 ```cpp SCOPED_TIMER(Base::_spill_recover_time); ^ ``` **be/src/util/runtime_profile.h:67:** expanded from macro 'SCOPED_TIMER' ```cpp #define SCOPED_TIMER(c) ScopedTimer<MonotonicStopWatch> MACRO_CONCAT(SCOPED_TIMER, __COUNTER__)(c) ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:135:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp DBUG_EXECUTE_IF("fault_inject::spill_sort_source::recover_spill_data", { ^ ``` **be/src/util/debug_points.h:36:** expanded from macro 'DBUG_EXECUTE_IF' ```cpp if (UNLIKELY(config::enable_debug_points)) { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:135:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp DBUG_EXECUTE_IF("fault_inject::spill_sort_source::recover_spill_data", { ^ ``` **be/src/util/debug_points.h:38:** expanded from macro 'DBUG_EXECUTE_IF' ```cpp if (dp) { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:140:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (status.ok()) { ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:144:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(status); ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:144:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp RETURN_IF_ERROR(status); ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:146:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (status.ok()) { ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:147:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp DBUG_EXECUTE_IF("fault_inject::spill_sort_source::spill_merged_data", { ^ ``` **be/src/util/debug_points.h:36:** expanded from macro 'DBUG_EXECUTE_IF' ```cpp if (UNLIKELY(config::enable_debug_points)) { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:147:** +5, including nesting penalty of 4, nesting level increased to 5 ```cpp DBUG_EXECUTE_IF("fault_inject::spill_sort_source::spill_merged_data", { ^ ``` **be/src/util/debug_points.h:38:** expanded from macro 'DBUG_EXECUTE_IF' ```cpp if (dp) { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:153:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(status); ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/spill_sort_source_operator.cpp:153:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp RETURN_IF_ERROR(status); ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` </details> ########## be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp: ########## @@ -759,9 +712,8 @@ Status PartitionedHashJoinProbeOperatorX::_setup_internal_operators( Status PartitionedHashJoinProbeOperatorX::pull(doris::RuntimeState* state, Review Comment: warning: function 'pull' has cognitive complexity of 73 (threshold 50) [readability-function-cognitive-complexity] ```cpp Status PartitionedHashJoinProbeOperatorX::pull(doris::RuntimeState* state, ^ ``` <details> <summary>Additional context</summary> **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:714:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if (!local_state._shared_state->_spill_status.ok()) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:721:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if (local_state._recovered_build_block && !local_state._recovered_build_block->empty()) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:721:** +1 ```cpp if (local_state._recovered_build_block && !local_state._recovered_build_block->empty()) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:724:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (!mutable_block) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:726:** +1, nesting level increased to 2 ```cpp } else { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:727:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(mutable_block->merge(local_state._recovered_build_block->to_block())); ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:727:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp RETURN_IF_ERROR(mutable_block->merge(local_state._recovered_build_block->to_block())); ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:732:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if (local_state._need_to_setup_internal_operators) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:734:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp RETURN_IF_ERROR(local_state.recover_build_blocks_from_disk( ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:734:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(local_state.recover_build_blocks_from_disk( ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:736:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (has_data) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:741:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp RETURN_IF_ERROR(local_state.finish_spilling(partition_index)); ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:741:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(local_state.finish_spilling(partition_index)); ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:742:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp RETURN_IF_ERROR(_setup_internal_operators(local_state, state)); ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:742:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(_setup_internal_operators(local_state, state)); ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:745:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (mutable_block && !mutable_block->empty()) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:745:** +1 ```cpp if (mutable_block && !mutable_block->empty()) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:751:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp while (_inner_probe_operator->need_more_input_data(runtime_state)) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:752:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (probe_blocks.empty()) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:755:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR( ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:755:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp RETURN_IF_ERROR( ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:757:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (!has_data) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:759:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp RETURN_IF_ERROR(_inner_probe_operator->push(runtime_state, &block, true)); ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:759:** +5, including nesting penalty of 4, nesting level increased to 5 ```cpp RETURN_IF_ERROR(_inner_probe_operator->push(runtime_state, &block, true)); ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:764:** +1, nesting level increased to 3 ```cpp } else { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:771:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (!block.empty()) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:772:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(_inner_probe_operator->push(runtime_state, &block, false)); ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:772:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp RETURN_IF_ERROR(_inner_probe_operator->push(runtime_state, &block, false)); ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:776:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp RETURN_IF_ERROR(_inner_probe_operator->pull(local_state._runtime_state.get(), output_block, ^ ``` **be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:776:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp RETURN_IF_ERROR(_inner_probe_operator->pull(local_state._runtime_state.get(), output_block, ^ ``` **be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:780:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if (in_mem_eos) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:785:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (local_state._partition_cursor == _partition_count) { ^ ``` **be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:787:** +1, nesting level increased to 2 ```cpp } else { ^ ``` </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