github-actions[bot] commented on code in PR #33291:
URL: https://github.com/apache/doris/pull/33291#discussion_r1559413445
##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -823,8 +836,22 @@ std::string FragmentMgr::dump_pipeline_tasks(int64_t
duration) {
Status FragmentMgr::exec_plan_fragment(const TPipelineFragmentParams& params,
Review Comment:
warning: function 'exec_plan_fragment' has cognitive complexity of 90
(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:848:** +1, including nesting penalty of 0,
nesting level increased to 1
```cpp
while (pos < total_size) {
^
```
**be/src/runtime/fragment_mgr.cpp:860:** +1, including nesting penalty of 0,
nesting level increased to 1
```cpp
RETURN_IF_ERROR(_get_query_ctx(params, params.query_id, true,
query_ctx));
^
```
**be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/runtime/fragment_mgr.cpp:860:** +2, including nesting penalty of 1,
nesting level increased to 2
```cpp
RETURN_IF_ERROR(_get_query_ctx(params, params.query_id, true,
query_ctx));
^
```
**be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/runtime/fragment_mgr.cpp:862:** +1
```cpp
const bool enable_pipeline_x =
params.query_options.__isset.enable_pipeline_x_engine &&
^
```
**be/src/runtime/fragment_mgr.cpp:864:** +1, including nesting penalty of 0,
nesting level increased to 1
```cpp
if (enable_pipeline_x) {
^
```
**be/src/runtime/fragment_mgr.cpp:876:** +2, including nesting penalty of 1,
nesting level increased to 2
```cpp
if (!prepare_st.ok()) {
^
```
**be/src/runtime/fragment_mgr.cpp:884:** +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:886:** +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:886:** +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:889:** +3, including nesting penalty of 2,
nesting level increased to 3
```cpp
if (!i && handler) {
^
```
**be/src/runtime/fragment_mgr.cpp:889:** +1
```cpp
if (!i && handler) {
^
```
**be/src/runtime/fragment_mgr.cpp:896:** +3, including nesting penalty of 2,
nesting level increased to 3
```cpp
if (iter != _pipeline_map.end()) {
^
```
**be/src/runtime/fragment_mgr.cpp:903:** +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:903:** +1
```cpp
if (!params.__isset.need_wait_execution_trigger ||
^
```
**be/src/runtime/fragment_mgr.cpp:925:** +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:925:** +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:927:** +1, nesting level increased to 1
```cpp
} else {
^
```
**be/src/runtime/fragment_mgr.cpp:928:** nesting level increased to 2
```cpp
auto pre_and_submit = [&](int i) {
^
```
**be/src/runtime/fragment_mgr.cpp:935:** +3, including nesting penalty of 2,
nesting level increased to 3
```cpp
if (iter != _pipeline_map.end()) {
^
```
**be/src/runtime/fragment_mgr.cpp:943:** +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:943:** +1
```cpp
if (!params.__isset.need_wait_execution_trigger ||
^
```
**be/src/runtime/fragment_mgr.cpp:958:** +3, including nesting penalty of 2,
nesting level increased to 3
```cpp
if (!prepare_st.ok()) {
^
```
**be/src/runtime/fragment_mgr.cpp:968:** +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:968:** +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:971:** +3, including nesting penalty of 2,
nesting level increased to 3
```cpp
if (i == 0 && handler) {
^
```
**be/src/runtime/fragment_mgr.cpp:971:** +1
```cpp
if (i == 0 && handler) {
^
```
**be/src/runtime/fragment_mgr.cpp:991:** +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:992:** +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:997:** +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:999:** +1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/runtime/fragment_mgr.cpp:1003:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if (target_size > 1) {
^
```
**be/src/runtime/fragment_mgr.cpp:1009:** +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:1010:** +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:1010:** +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:1021:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
if (prepare_done != target_size) {
^
```
**be/src/runtime/fragment_mgr.cpp:1024:** +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:1025:** +5, including nesting penalty of
4, nesting level increased to 5
```cpp
if (!prepare_status[i].ok()) {
^
```
**be/src/runtime/fragment_mgr.cpp:1031:** +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: [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]