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


##########
be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:
##########
@@ -511,11 +515,17 @@
     return Status::OK();
 }
 
-Status PipelineXFragmentContext::_build_pipeline_tasks(
-        const doris::TPipelineFragmentParams& request) {
+Status PipelineXFragmentContext::_build_pipeline_x_tasks(

Review Comment:
   warning: function '_build_pipeline_x_tasks' exceeds recommended 
size/complexity thresholds [readability-function-size]
   ```cpp
   Status PipelineXFragmentContext::_build_pipeline_x_tasks(
                                    ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:517:** 222 
lines including whitespace and comments (threshold 80)
   ```cpp
   Status PipelineXFragmentContext::_build_pipeline_x_tasks(
                                    ^
   ```
   
   </details>
   



##########
be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:
##########
@@ -182,7 +186,8 @@ void PipelineXFragmentContext::cancel(const 
PPlanFragmentCancelReason& reason,
     }
 }
 
-Status PipelineXFragmentContext::prepare(const doris::TPipelineFragmentParams& 
request) {
+Status PipelineXFragmentContext::prepare(const doris::TPipelineFragmentParams& 
request,

Review Comment:
   warning: function 'prepare' has cognitive complexity of 51 (threshold 50) 
[readability-function-cognitive-complexity]
   ```cpp
   Status PipelineXFragmentContext::prepare(const 
doris::TPipelineFragmentParams& request,
                                    ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:190:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (_prepared) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:193:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (request.__isset.query_options && 
request.query_options.__isset.execution_timeout) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:193:** +1
   ```cpp
       if (request.__isset.query_options && 
request.query_options.__isset.execution_timeout) {
                                         ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:197:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       _total_instances = request.__isset.total_instances ? 
request.total_instances : _num_instances;
                                                          ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:209:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (request.query_options.__isset.is_report_success) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:218:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (request.__isset.backend_id) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:221:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (request.__isset.import_label) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:224:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (request.__isset.db_name) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:227:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (request.__isset.load_job_id) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:231:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (request.is_simplified_param) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:233:** +1, 
nesting level increased to 1
   ```cpp
       } else {
         ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:235:** +2, 
including nesting penalty of 1, nesting level increased to 2
   ```cpp
           RETURN_IF_ERROR(
           ^
   ```
   **be/src/common/status.h:619:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:235:** +3, 
including nesting penalty of 2, nesting level increased to 3
   ```cpp
           RETURN_IF_ERROR(
           ^
   ```
   **be/src/common/status.h:621:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:245:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (local_params.__isset.runtime_filter_params) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:249:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (local_params.__isset.topn_filter_source_node_ids) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:251:** +1, 
nesting level increased to 1
   ```cpp
       } else {
         ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:259:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_build_pipelines(
       ^
   ```
   **be/src/common/exception.h:105:** expanded from macro 
'RETURN_IF_ERROR_OR_CATCH_EXCEPTION'
   ```cpp
       do {                                                                     
                    \
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:259:** +2, 
including nesting penalty of 1, nesting level increased to 2
   ```cpp
       RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_build_pipelines(
       ^
   ```
   **be/src/common/exception.h:111:** expanded from macro 
'RETURN_IF_ERROR_OR_CATCH_EXCEPTION'
   ```cpp
                   if (UNLIKELY(!_status_.ok())) {                              
                    \
                   ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:259:** +2, 
including nesting penalty of 1, nesting level increased to 2
   ```cpp
       RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_build_pipelines(
       ^
   ```
   **be/src/common/exception.h:115:** expanded from macro 
'RETURN_IF_ERROR_OR_CATCH_EXCEPTION'
   ```cpp
           } catch (const doris::Exception& e) {                                
                    \
             ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:259:** +3, 
including nesting penalty of 2, nesting level increased to 3
   ```cpp
       RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_build_pipelines(
       ^
   ```
   **be/src/common/exception.h:116:** expanded from macro 
'RETURN_IF_ERROR_OR_CATCH_EXCEPTION'
   ```cpp
               if (e.code() == doris::ErrorCode::MEM_ALLOC_FAILED) {            
                    \
               ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:263:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (!request.fragment.__isset.output_sink) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:266:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_create_data_sink(
       ^
   ```
   **be/src/common/exception.h:105:** expanded from macro 
'RETURN_IF_ERROR_OR_CATCH_EXCEPTION'
   ```cpp
       do {                                                                     
                    \
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:266:** +2, 
including nesting penalty of 1, nesting level increased to 2
   ```cpp
       RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_create_data_sink(
       ^
   ```
   **be/src/common/exception.h:111:** expanded from macro 
'RETURN_IF_ERROR_OR_CATCH_EXCEPTION'
   ```cpp
                   if (UNLIKELY(!_status_.ok())) {                              
                    \
                   ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:266:** +2, 
including nesting penalty of 1, nesting level increased to 2
   ```cpp
       RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_create_data_sink(
       ^
   ```
   **be/src/common/exception.h:115:** expanded from macro 
'RETURN_IF_ERROR_OR_CATCH_EXCEPTION'
   ```cpp
           } catch (const doris::Exception& e) {                                
                    \
             ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:266:** +3, 
including nesting penalty of 2, nesting level increased to 3
   ```cpp
       RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_create_data_sink(
       ^
   ```
   **be/src/common/exception.h:116:** expanded from macro 
'RETURN_IF_ERROR_OR_CATCH_EXCEPTION'
   ```cpp
               if (e.code() == doris::ErrorCode::MEM_ALLOC_FAILED) {            
                    \
               ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:270:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       RETURN_IF_ERROR(_sink->init(request.fragment.output_sink));
       ^
   ```
   **be/src/common/status.h:619:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:270:** +2, 
including nesting penalty of 1, nesting level increased to 2
   ```cpp
       RETURN_IF_ERROR(_sink->init(request.fragment.output_sink));
       ^
   ```
   **be/src/common/status.h:621:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:271:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       RETURN_IF_ERROR(root_pipeline->set_sink(_sink));
       ^
   ```
   **be/src/common/status.h:619:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:271:** +2, 
including nesting penalty of 1, nesting level increased to 2
   ```cpp
       RETURN_IF_ERROR(root_pipeline->set_sink(_sink));
       ^
   ```
   **be/src/common/status.h:621:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:277:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       if (_enable_local_shuffle()) {
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:278:** +2, 
including nesting penalty of 1, nesting level increased to 2
   ```cpp
           RETURN_IF_ERROR(_plan_local_exchange(request.num_buckets,
           ^
   ```
   **be/src/common/status.h:619:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:278:** +3, 
including nesting penalty of 2, nesting level increased to 3
   ```cpp
           RETURN_IF_ERROR(_plan_local_exchange(request.num_buckets,
           ^
   ```
   **be/src/common/status.h:621:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:290:** +1, 
including nesting penalty of 0, nesting level increased to 1
   ```cpp
       RETURN_IF_ERROR(_build_pipeline_x_tasks(request, thread_pool));
       ^
   ```
   **be/src/common/status.h:619:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:290:** +2, 
including nesting penalty of 1, nesting level increased to 2
   ```cpp
       RETURN_IF_ERROR(_build_pipeline_x_tasks(request, thread_pool));
       ^
   ```
   **be/src/common/status.h:621:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   
   </details>
   



##########
be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:
##########
@@ -182,7 +186,8 @@
     }
 }
 
-Status PipelineXFragmentContext::prepare(const doris::TPipelineFragmentParams& 
request) {
+Status PipelineXFragmentContext::prepare(const doris::TPipelineFragmentParams& 
request,

Review Comment:
   warning: function 'prepare' exceeds recommended size/complexity thresholds 
[readability-function-size]
   ```cpp
   Status PipelineXFragmentContext::prepare(const 
doris::TPipelineFragmentParams& request,
                                    ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:188:** 107 
lines including whitespace and comments (threshold 80)
   ```cpp
   Status PipelineXFragmentContext::prepare(const 
doris::TPipelineFragmentParams& request,
                                    ^
   ```
   
   </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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to