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


##########
be/src/vec/functions/function_ip.h:
##########
@@ -878,31 +925,98 @@ class FunctionIPv6CIDRToRange : public IFunction {
 
     template <typename FromColumn>
     static ColumnPtr execute_impl(const FromColumn& from_column, const 
ColumnInt16& cidr_column,

Review Comment:
   warning: function 'execute_impl' has cognitive complexity of 58 (threshold 
50) [readability-function-cognitive-complexity]
   ```cpp
       static ColumnPtr execute_impl(const FromColumn& from_column, const 
ColumnInt16& cidr_column,
                        ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/vec/functions/function_ip.h:936:** +1, including nesting penalty of 
0, nesting level increased to 1
   ```cpp
           if (is_addr_const) {
           ^
   ```
   **be/src/vec/functions/function_ip.h:937:** +2, including nesting penalty of 
1, nesting level increased to 2
   ```cpp
               if (is_cidr_const) {
               ^
   ```
   **be/src/vec/functions/function_ip.h:939:** +3, including nesting penalty of 
2, nesting level increased to 3
   ```cpp
                   if (cidr < 0 || cidr > max_cidr_mask) {
                   ^
   ```
   **be/src/vec/functions/function_ip.h:939:** +1
   ```cpp
                   if (cidr < 0 || cidr > max_cidr_mask) {
                                ^
   ```
   **be/src/vec/functions/function_ip.h:943:** +3, including nesting penalty of 
2, nesting level increased to 3
   ```cpp
                   for (size_t i = 0; i < input_rows_count; ++i) {
                   ^
   ```
   **be/src/vec/functions/function_ip.h:944:** +4, including nesting penalty of 
3, nesting level increased to 4
   ```cpp
                       if constexpr (std::is_same_v<FromColumn, ColumnString>) {
                       ^
   ```
   **be/src/vec/functions/function_ip.h:951:** +1, nesting level increased to 4
   ```cpp
                       } else {
                         ^
   ```
   **be/src/vec/functions/function_ip.h:957:** +1, nesting level increased to 2
   ```cpp
               } else {
                 ^
   ```
   **be/src/vec/functions/function_ip.h:958:** +3, including nesting penalty of 
2, nesting level increased to 3
   ```cpp
                   for (size_t i = 0; i < input_rows_count; ++i) {
                   ^
   ```
   **be/src/vec/functions/function_ip.h:960:** +4, including nesting penalty of 
3, nesting level increased to 4
   ```cpp
                       if (cidr < 0 || cidr > max_cidr_mask) {
                       ^
   ```
   **be/src/vec/functions/function_ip.h:960:** +1
   ```cpp
                       if (cidr < 0 || cidr > max_cidr_mask) {
                                    ^
   ```
   **be/src/vec/functions/function_ip.h:964:** +4, including nesting penalty of 
3, nesting level increased to 4
   ```cpp
                       if constexpr (std::is_same_v<FromColumn, ColumnString>) {
                       ^
   ```
   **be/src/vec/functions/function_ip.h:971:** +1, nesting level increased to 4
   ```cpp
                       } else {
                         ^
   ```
   **be/src/vec/functions/function_ip.h:978:** +1, nesting level increased to 1
   ```cpp
           } else {
             ^
   ```
   **be/src/vec/functions/function_ip.h:979:** +2, including nesting penalty of 
1, nesting level increased to 2
   ```cpp
               if (is_cidr_const) {
               ^
   ```
   **be/src/vec/functions/function_ip.h:981:** +3, including nesting penalty of 
2, nesting level increased to 3
   ```cpp
                   if (cidr < 0 || cidr > max_cidr_mask) {
                   ^
   ```
   **be/src/vec/functions/function_ip.h:981:** +1
   ```cpp
                   if (cidr < 0 || cidr > max_cidr_mask) {
                                ^
   ```
   **be/src/vec/functions/function_ip.h:985:** +3, including nesting penalty of 
2, nesting level increased to 3
   ```cpp
                   for (size_t i = 0; i < input_rows_count; ++i) {
                   ^
   ```
   **be/src/vec/functions/function_ip.h:986:** +4, including nesting penalty of 
3, nesting level increased to 4
   ```cpp
                       if constexpr (std::is_same_v<FromColumn, ColumnString>) {
                       ^
   ```
   **be/src/vec/functions/function_ip.h:993:** +1, nesting level increased to 4
   ```cpp
                       } else {
                         ^
   ```
   **be/src/vec/functions/function_ip.h:999:** +1, nesting level increased to 2
   ```cpp
               } else {
                 ^
   ```
   **be/src/vec/functions/function_ip.h:1000:** +3, including nesting penalty 
of 2, nesting level increased to 3
   ```cpp
                   for (size_t i = 0; i < input_rows_count; ++i) {
                   ^
   ```
   **be/src/vec/functions/function_ip.h:1002:** +4, including nesting penalty 
of 3, nesting level increased to 4
   ```cpp
                       if (cidr < 0 || cidr > max_cidr_mask) {
                       ^
   ```
   **be/src/vec/functions/function_ip.h:1002:** +1
   ```cpp
                       if (cidr < 0 || cidr > max_cidr_mask) {
                                    ^
   ```
   **be/src/vec/functions/function_ip.h:1006:** +4, including nesting penalty 
of 3, nesting level increased to 4
   ```cpp
                       if constexpr (std::is_same_v<FromColumn, ColumnString>) {
                       ^
   ```
   **be/src/vec/functions/function_ip.h:1013:** +1, nesting level increased to 4
   ```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: 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