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


##########
be/src/pipeline/exec/scan_operator.cpp:
##########
@@ -1090,7 +1078,7 @@ void 
ScanLocalState<Derived>::_normalize_compound_predicate(
 
 template <typename Derived>
 template <PrimitiveType T>
-Status ScanLocalState<Derived>::_normalize_binary_in_compound_predicate(
+Status ScanLocalState<Derived>::_normalize_binary_compound_predicate(

Review Comment:
   warning: function '_normalize_binary_compound_predicate' has cognitive 
complexity of 54 (threshold 50) [readability-function-cognitive-complexity]
   ```cpp
   Status ScanLocalState<Derived>::_normalize_binary_compound_predicate(
                                   ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/pipeline/exec/scan_operator.cpp:1084:** +1, including nesting 
penalty of 0, nesting level increased to 1
   ```cpp
       if (TExprNodeType::BINARY_PRED == expr->node_type()) {
       ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1085:** nesting level increased to 2
   ```cpp
           auto eq_checker = [](const std::string& fn_name) { return fn_name == 
"eq"; };
                             ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1086:** nesting level increased to 2
   ```cpp
           auto ne_checker = [](const std::string& fn_name) { return fn_name == 
"ne"; };
                             ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1087:** nesting level increased to 2
   ```cpp
           auto noneq_checker = [](const std::string& fn_name) {
                                ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1088:** +1
   ```cpp
               return fn_name != "ne" && fn_name != "eq" && fn_name != 
"eq_for_null";
                                                         ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1096:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
           RETURN_IF_ERROR(_should_push_down_binary_predicate(
           ^
   ```
   **be/src/common/status.h:609:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1096:** +3, including nesting 
penalty of 2, nesting level increased to 3
   ```cpp
           RETURN_IF_ERROR(_should_push_down_binary_predicate(
           ^
   ```
   **be/src/common/status.h:611:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1099:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
           RETURN_IF_ERROR(_should_push_down_binary_predicate(
           ^
   ```
   **be/src/common/status.h:609:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1099:** +3, including nesting 
penalty of 2, nesting level increased to 3
   ```cpp
           RETURN_IF_ERROR(_should_push_down_binary_predicate(
           ^
   ```
   **be/src/common/status.h:611:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1102:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
           RETURN_IF_ERROR(_should_push_down_binary_predicate(
           ^
   ```
   **be/src/common/status.h:609:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1102:** +3, including nesting 
penalty of 2, nesting level increased to 3
   ```cpp
           RETURN_IF_ERROR(_should_push_down_binary_predicate(
           ^
   ```
   **be/src/common/status.h:611:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1105:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
           if (eq_pdt == vectorized::VScanNode::PushDownType::UNACCEPTABLE &&
           ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1106:** +1
   ```cpp
               ne_pdt == vectorized::VScanNode::PushDownType::UNACCEPTABLE &&
                                                                           ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1113:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
           if (eq_pdt == vectorized::VScanNode::PushDownType::ACCEPTABLE ||
           ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1114:** +1
   ```cpp
               ne_pdt == vectorized::VScanNode::PushDownType::ACCEPTABLE ||
                                                                         ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1116:** +3, including nesting 
penalty of 2, nesting level increased to 3
   ```cpp
               if (value.data != nullptr) {
               ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1117:** +4, including nesting 
penalty of 3, nesting level increased to 4
   ```cpp
                   if constexpr (T == TYPE_CHAR || T == TYPE_VARCHAR || T == 
TYPE_STRING ||
                   ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1117:** +1
   ```cpp
                   if constexpr (T == TYPE_CHAR || T == TYPE_VARCHAR || T == 
TYPE_STRING ||
                                                                                
         ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1120:** +5, including nesting 
penalty of 4, nesting level increased to 5
   ```cpp
                       RETURN_IF_ERROR(_change_value_range<false>(
                       ^
   ```
   **be/src/common/status.h:609:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1120:** +6, including nesting 
penalty of 5, nesting level increased to 6
   ```cpp
                       RETURN_IF_ERROR(_change_value_range<false>(
                       ^
   ```
   **be/src/common/status.h:611:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1124:** +1, nesting level increased 
to 4
   ```cpp
                   } else {
                     ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1125:** +5, including nesting 
penalty of 4, nesting level increased to 5
   ```cpp
                       RETURN_IF_ERROR(_change_value_range<false>(
                       ^
   ```
   **be/src/common/status.h:609:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/pipeline/exec/scan_operator.cpp:1125:** +6, including nesting 
penalty of 5, nesting level increased to 6
   ```cpp
                       RETURN_IF_ERROR(_change_value_range<false>(
                       ^
   ```
   **be/src/common/status.h:611:** 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: 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

Reply via email to