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


##########
be/src/exprs/runtime_filter.cpp:
##########
@@ -453,9 +453,11 @@ class RuntimePredicateWrapper {
                           std::vector<vectorized::VExprSPtr>& push_exprs, 
const TExpr& probe_expr);
 
     Status merge(const RuntimePredicateWrapper* wrapper) {

Review Comment:
   warning: function 'merge' has cognitive complexity of 59 (threshold 50) 
[readability-function-cognitive-complexity]
   ```cpp
       Status merge(const RuntimePredicateWrapper* wrapper) {
              ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/exprs/runtime_filter.cpp:456:** +1
   ```cpp
                   _filter_type == RuntimeFilterType::IN_OR_BLOOM_FILTER &&
                                                                         ^
   ```
   **be/src/exprs/runtime_filter.cpp:461:** +1
   ```cpp
           bool can_not_merge_other = _filter_type != 
RuntimeFilterType::IN_OR_BLOOM_FILTER &&
                                                                                
            ^
   ```
   **be/src/exprs/runtime_filter.cpp:464:** +1
   ```cpp
           CHECK(!can_not_merge_in_or_bloom && !can_not_merge_other)
                                            ^
   ```
   **be/src/exprs/runtime_filter.cpp:469:** +1, including nesting penalty of 0, 
nesting level increased to 1
   ```cpp
           switch (_filter_type) {
           ^
   ```
   **be/src/exprs/runtime_filter.cpp:471:** +2, including nesting penalty of 1, 
nesting level increased to 2
   ```cpp
               if (_is_ignored_in_filter) {
               ^
   ```
   **be/src/exprs/runtime_filter.cpp:473:** +1, nesting level increased to 2
   ```cpp
               } else if (wrapper->_is_ignored_in_filter) {
                      ^
   ```
   **be/src/exprs/runtime_filter.cpp:485:** +2, including nesting penalty of 1, 
nesting level increased to 2
   ```cpp
               if (_max_in_num >= 0 && _context.hybrid_set->size() >= 
_max_in_num) {
               ^
   ```
   **be/src/exprs/runtime_filter.cpp:505:** +2, including nesting penalty of 1, 
nesting level increased to 2
   ```cpp
               RETURN_IF_ERROR(
               ^
   ```
   **be/src/common/status.h:532:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/exprs/runtime_filter.cpp:505:** +3, including nesting penalty of 2, 
nesting level increased to 3
   ```cpp
               RETURN_IF_ERROR(
               ^
   ```
   **be/src/common/status.h:534:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/exprs/runtime_filter.cpp:510:** +2, including nesting penalty of 1, 
nesting level increased to 2
   ```cpp
               RETURN_IF_ERROR(
               ^
   ```
   **be/src/common/status.h:532:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/exprs/runtime_filter.cpp:510:** +3, including nesting penalty of 2, 
nesting level increased to 3
   ```cpp
               RETURN_IF_ERROR(
               ^
   ```
   **be/src/common/status.h:534:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/exprs/runtime_filter.cpp:515:** +2, including nesting penalty of 1, 
nesting level increased to 2
   ```cpp
               auto real_filter_type = _is_bloomfilter ? 
RuntimeFilterType::BLOOM_FILTER
                                                       ^
   ```
   **be/src/exprs/runtime_filter.cpp:519:** +2, including nesting penalty of 1, 
nesting level increased to 2
   ```cpp
               if (other_filter_type == RuntimeFilterType::IN_OR_BLOOM_FILTER) {
               ^
   ```
   **be/src/exprs/runtime_filter.cpp:520:** +3, including nesting penalty of 2, 
nesting level increased to 3
   ```cpp
                   other_filter_type = wrapper->_is_bloomfilter ? 
RuntimeFilterType::BLOOM_FILTER
                                                                ^
   ```
   **be/src/exprs/runtime_filter.cpp:524:** +2, including nesting penalty of 1, 
nesting level increased to 2
   ```cpp
               if (real_filter_type == RuntimeFilterType::IN_FILTER) {
               ^
   ```
   **be/src/exprs/runtime_filter.cpp:525:** +3, including nesting penalty of 2, 
nesting level increased to 3
   ```cpp
                   if (other_filter_type == RuntimeFilterType::IN_FILTER) { // 
in merge in
                   ^
   ```
   **be/src/exprs/runtime_filter.cpp:531:** +4, including nesting penalty of 3, 
nesting level increased to 4
   ```cpp
                       if (_max_in_num >= 0 && _context.hybrid_set->size() >= 
_max_in_num) {
                       ^
   ```
   **be/src/exprs/runtime_filter.cpp:537:** +1, nesting level increased to 3
   ```cpp
                   } else {
                     ^
   ```
   **be/src/exprs/runtime_filter.cpp:541:** +4, including nesting penalty of 3, 
nesting level increased to 4
   ```cpp
                       RETURN_IF_ERROR(_context.bloom_filter_func->merge(
                       ^
   ```
   **be/src/common/status.h:532:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/exprs/runtime_filter.cpp:541:** +5, including nesting penalty of 4, 
nesting level increased to 5
   ```cpp
                       RETURN_IF_ERROR(_context.bloom_filter_func->merge(
                       ^
   ```
   **be/src/common/status.h:534:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/exprs/runtime_filter.cpp:544:** +1, nesting level increased to 2
   ```cpp
               } else {
                 ^
   ```
   **be/src/exprs/runtime_filter.cpp:545:** +3, including nesting penalty of 2, 
nesting level increased to 3
   ```cpp
                   if (other_filter_type == RuntimeFilterType::IN_FILTER) { // 
bloom filter merge in
                   ^
   ```
   **be/src/exprs/runtime_filter.cpp:552:** +1, nesting level increased to 3
   ```cpp
                   } else {
                     ^
   ```
   **be/src/exprs/runtime_filter.cpp:553:** +4, including nesting penalty of 3, 
nesting level increased to 4
   ```cpp
                       RETURN_IF_ERROR(_context.bloom_filter_func->merge(
                       ^
   ```
   **be/src/common/status.h:532:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/exprs/runtime_filter.cpp:553:** +5, including nesting penalty of 4, 
nesting level increased to 5
   ```cpp
                       RETURN_IF_ERROR(_context.bloom_filter_func->merge(
                       ^
   ```
   **be/src/common/status.h:534:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   
   </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