github-actions[bot] commented on code in PR #44394:
URL: https://github.com/apache/doris/pull/44394#discussion_r1851463089
##########
be/src/exprs/runtime_filter.cpp:
##########
@@ -994,20 +994,20 @@ void IRuntimeFilter::insert_batch(const
vectorized::ColumnPtr column, size_t sta
Status IRuntimeFilter::publish(bool publish_local) {
Review Comment:
warning: function 'publish' has cognitive complexity of 82 (threshold 50)
[readability-function-cognitive-complexity]
```cpp
Status IRuntimeFilter::publish(bool publish_local) {
^
```
<details>
<summary>Additional context</summary>
**be/src/exprs/runtime_filter.cpp:996:** nesting level increased to 1
```cpp
auto send_to_remote_targets = [&](IRuntimeFilter* filter, uint64_t
local_merge_time) {
^
```
**be/src/exprs/runtime_filter.cpp:999:** +2, including nesting penalty of 1,
nesting level increased to 2
```cpp
RETURN_IF_ERROR(_state->global_runtime_filter_mgr()->get_merge_addr(&addr));
^
```
**be/src/common/status.h:631:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/exprs/runtime_filter.cpp:999:** +3, including nesting penalty of 2,
nesting level increased to 3
```cpp
RETURN_IF_ERROR(_state->global_runtime_filter_mgr()->get_merge_addr(&addr));
^
```
**be/src/common/status.h:633:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/exprs/runtime_filter.cpp:1002:** nesting level increased to 1
```cpp
auto send_to_local_targets =
[&](std::shared_ptr<RuntimePredicateWrapper> wrapper, bool global,
^
```
**be/src/exprs/runtime_filter.cpp:1014:** nesting level increased to 1
```cpp
auto do_merge = [&]() {
^
```
**be/src/exprs/runtime_filter.cpp:1015:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if
(!_state->global_runtime_filter_mgr()->get_consume_filters(_filter_id).empty())
{
^
```
**be/src/exprs/runtime_filter.cpp:1017:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_state->global_runtime_filter_mgr()->get_local_merge_producer_filters(
^
```
**be/src/common/status.h:631:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/exprs/runtime_filter.cpp:1017:** +4, including nesting penalty of
3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(_state->global_runtime_filter_mgr()->get_local_merge_producer_filters(
^
```
**be/src/common/status.h:633:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/exprs/runtime_filter.cpp:1021:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(local_merge_filters->filters[0]->merge_from(_wrapper.get()));
^
```
**be/src/common/status.h:631:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/exprs/runtime_filter.cpp:1021:** +4, including nesting penalty of
3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(local_merge_filters->filters[0]->merge_from(_wrapper.get()));
^
```
**be/src/common/status.h:633:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/exprs/runtime_filter.cpp:1024:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
if (local_merge_filters->merge_time == 0) {
^
```
**be/src/exprs/runtime_filter.cpp:1025:** +4, including nesting penalty of
3, nesting level increased to 4
```cpp
if (_has_local_target) {
^
```
**be/src/exprs/runtime_filter.cpp:1026:** +5, including nesting penalty of
4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(send_to_local_targets(
^
```
**be/src/common/status.h:631:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/exprs/runtime_filter.cpp:1026:** +6, including nesting penalty of
5, nesting level increased to 6
```cpp
RETURN_IF_ERROR(send_to_local_targets(
^
```
**be/src/common/status.h:633:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/exprs/runtime_filter.cpp:1029:** +1, nesting level increased to 4
```cpp
} else {
^
```
**be/src/exprs/runtime_filter.cpp:1030:** +5, including nesting penalty of
4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(send_to_remote_targets(
^
```
**be/src/common/status.h:631:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/exprs/runtime_filter.cpp:1030:** +6, including nesting penalty of
5, nesting level increased to 6
```cpp
RETURN_IF_ERROR(send_to_remote_targets(
^
```
**be/src/common/status.h:633:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/exprs/runtime_filter.cpp:1039:** +1, including nesting penalty of
0, nesting level increased to 1
```cpp
if (_has_local_target) {
^
```
**be/src/exprs/runtime_filter.cpp:1042:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(do_merge());
^
```
**be/src/common/status.h:631:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/exprs/runtime_filter.cpp:1042:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(do_merge());
^
```
**be/src/common/status.h:633:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/exprs/runtime_filter.cpp:1043:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(send_to_local_targets(_wrapper, false));
^
```
**be/src/common/status.h:631:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/exprs/runtime_filter.cpp:1043:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(send_to_local_targets(_wrapper, false));
^
```
**be/src/common/status.h:633:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/exprs/runtime_filter.cpp:1044:** +1, nesting level increased to 1
```cpp
} else if (!publish_local) {
^
```
**be/src/exprs/runtime_filter.cpp:1045:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if (_is_broadcast_join || _state->get_query_ctx()->be_exec_version()
< USE_NEW_SERDE) {
^
```
**be/src/exprs/runtime_filter.cpp:1045:** +1
```cpp
if (_is_broadcast_join || _state->get_query_ctx()->be_exec_version()
< USE_NEW_SERDE) {
^
```
**be/src/exprs/runtime_filter.cpp:1046:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(send_to_remote_targets(this, 0));
^
```
**be/src/common/status.h:631:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/exprs/runtime_filter.cpp:1046:** +4, including nesting penalty of
3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(send_to_remote_targets(this, 0));
^
```
**be/src/common/status.h:633:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/exprs/runtime_filter.cpp:1047:** +1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/exprs/runtime_filter.cpp:1048:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(do_merge());
^
```
**be/src/common/status.h:631:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/exprs/runtime_filter.cpp:1048:** +4, including nesting penalty of
3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(do_merge());
^
```
**be/src/common/status.h:633:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/exprs/runtime_filter.cpp:1050:** +1, nesting level increased to 1
```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]