github-actions[bot] commented on code in PR #32346: URL: https://github.com/apache/doris/pull/32346#discussion_r1527798768
########## be/src/runtime/fragment_mgr.cpp: ########## @@ -773,6 +780,7 @@ std::string FragmentMgr::dump_pipeline_tasks() { } Status FragmentMgr::exec_plan_fragment(const TPipelineFragmentParams& params, Review Comment: warning: function 'exec_plan_fragment' has cognitive complexity of 88 (threshold 50) [readability-function-cognitive-complexity] ```cpp Status FragmentMgr::exec_plan_fragment(const TPipelineFragmentParams& params, ^ ``` <details> <summary>Additional context</summary> **be/src/runtime/fragment_mgr.cpp:791:** +1 ```cpp const bool enable_pipeline_x = params.query_options.__isset.enable_pipeline_x_engine && ^ ``` **be/src/runtime/fragment_mgr.cpp:793:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if (enable_pipeline_x) { ^ ``` **be/src/runtime/fragment_mgr.cpp:805:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (!prepare_st.ok()) { ^ ``` **be/src/runtime/fragment_mgr.cpp:813:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp for (size_t i = 0; i < params.local_params.size(); i++) { ^ ``` **be/src/runtime/fragment_mgr.cpp:815:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(_runtimefilter_controller.add_entity( ^ ``` **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/runtime/fragment_mgr.cpp:815:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp RETURN_IF_ERROR(_runtimefilter_controller.add_entity( ^ ``` **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/runtime/fragment_mgr.cpp:818:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (!i && handler) { ^ ``` **be/src/runtime/fragment_mgr.cpp:818:** +1 ```cpp if (!i && handler) { ^ ``` **be/src/runtime/fragment_mgr.cpp:825:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (iter != _pipeline_map.end()) { ^ ``` **be/src/runtime/fragment_mgr.cpp:832:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (!params.__isset.need_wait_execution_trigger || ^ ``` **be/src/runtime/fragment_mgr.cpp:832:** +1 ```cpp if (!params.__isset.need_wait_execution_trigger || ^ ``` **be/src/runtime/fragment_mgr.cpp:847:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (!query_ctx->fragment_id_to_pipeline_ctx.contains(params.fragment_id)) { ^ ``` **be/src/runtime/fragment_mgr.cpp:854:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp RETURN_IF_ERROR(context->submit()); ^ ``` **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/runtime/fragment_mgr.cpp:854:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(context->submit()); ^ ``` **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/runtime/fragment_mgr.cpp:856:** +1, nesting level increased to 1 ```cpp } else { ^ ``` **be/src/runtime/fragment_mgr.cpp:857:** nesting level increased to 2 ```cpp auto pre_and_submit = [&](int i) { ^ ``` **be/src/runtime/fragment_mgr.cpp:864:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (iter != _pipeline_map.end()) { ^ ``` **be/src/runtime/fragment_mgr.cpp:872:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (!params.__isset.need_wait_execution_trigger || ^ ``` **be/src/runtime/fragment_mgr.cpp:872:** +1 ```cpp if (!params.__isset.need_wait_execution_trigger || ^ ``` **be/src/runtime/fragment_mgr.cpp:887:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (!prepare_st.ok()) { ^ ``` **be/src/runtime/fragment_mgr.cpp:897:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp RETURN_IF_ERROR(_runtimefilter_controller.add_entity( ^ ``` **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/runtime/fragment_mgr.cpp:897:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp RETURN_IF_ERROR(_runtimefilter_controller.add_entity( ^ ``` **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/runtime/fragment_mgr.cpp:900:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (i == 0 && handler) { ^ ``` **be/src/runtime/fragment_mgr.cpp:900:** +1 ```cpp if (i == 0 && handler) { ^ ``` **be/src/runtime/fragment_mgr.cpp:915:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (local_params.__isset.runtime_filter_params) { ^ ``` **be/src/runtime/fragment_mgr.cpp:916:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (local_params.__isset.runtime_filter_params) { ^ ``` **be/src/runtime/fragment_mgr.cpp:921:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (local_params.__isset.topn_filter_source_node_ids) { ^ ``` **be/src/runtime/fragment_mgr.cpp:923:** +1, nesting level increased to 2 ```cpp } else { ^ ``` **be/src/runtime/fragment_mgr.cpp:927:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (target_size > 1) { ^ ``` **be/src/runtime/fragment_mgr.cpp:933:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp for (size_t i = 0; i < target_size; i++) { ^ ``` **be/src/runtime/fragment_mgr.cpp:934:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp RETURN_IF_ERROR(_thread_pool->submit_func([&, i]() { ^ ``` **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR' ```cpp do { \ ^ ``` **be/src/runtime/fragment_mgr.cpp:934:** +5, including nesting penalty of 4, nesting level increased to 5 ```cpp RETURN_IF_ERROR(_thread_pool->submit_func([&, i]() { ^ ``` **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR' ```cpp if (UNLIKELY(!_status_.ok())) { \ ^ ``` **be/src/runtime/fragment_mgr.cpp:945:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (prepare_done != target_size) { ^ ``` **be/src/runtime/fragment_mgr.cpp:948:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp for (size_t i = 0; i < target_size; i++) { ^ ``` **be/src/runtime/fragment_mgr.cpp:949:** +5, including nesting penalty of 4, nesting level increased to 5 ```cpp if (!prepare_status[i].ok()) { ^ ``` **be/src/runtime/fragment_mgr.cpp:955:** +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