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


##########
be/src/vec/exec/scan/vfile_scanner.cpp:
##########
@@ -309,7 +318,7 @@ Status VFileScanner::open(RuntimeState* state) {
 // _fill_columns_from_path      -     -    -  -                 x              
  x      -
 // _fill_missing_columns        -     -    -  x                 -              
  x      -
 // _convert_to_output_block     -     -    -  -                 -              
  -      x
-Status VFileScanner::_get_block_impl(RuntimeState* state, Block* block, bool* 
eof) {
+Status VFileScanner::_get_block_wrapped(RuntimeState* state, Block* block, 
bool* eof) {

Review Comment:
   warning: function '_get_block_wrapped' has cognitive complexity of 94 
(threshold 50) [readability-function-cognitive-complexity]
   ```cpp
   Status VFileScanner::_get_block_wrapped(RuntimeState* state, Block* block, 
bool* eof) {
                        ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/vec/exec/scan/vfile_scanner.cpp:321:** +1, including nesting 
penalty of 0, nesting level increased to 1
   ```cpp
       do {
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:322:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
           RETURN_IF_CANCELLED(state);
           ^
   ```
   **be/src/runtime/runtime_state.h:769:** expanded from macro 
'RETURN_IF_CANCELLED'
   ```cpp
       do {                                                                     
         \
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:322:** +3, including nesting 
penalty of 2, nesting level increased to 3
   ```cpp
           RETURN_IF_CANCELLED(state);
           ^
   ```
   **be/src/runtime/runtime_state.h:770:** expanded from macro 
'RETURN_IF_CANCELLED'
   ```cpp
           if (UNLIKELY((state)->is_cancelled())) return 
Status::Cancelled("Cancelled"); \
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:323:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
           if (_cur_reader == nullptr || _cur_reader_eof) {
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:324:** +3, including nesting 
penalty of 2, nesting level increased to 3
   ```cpp
               RETURN_IF_ERROR(_get_next_reader());
               ^
   ```
   **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:324:** +4, including nesting 
penalty of 3, nesting level increased to 4
   ```cpp
               RETURN_IF_ERROR(_get_next_reader());
               ^
   ```
   **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:327:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
           if (_scanner_eof) {
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:335:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
           RETURN_IF_ERROR(_init_src_block(block));
           ^
   ```
   **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:335:** +3, including nesting 
penalty of 2, nesting level increased to 3
   ```cpp
           RETURN_IF_ERROR(_init_src_block(block));
           ^
   ```
   **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:341:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
               RETURN_IF_ERROR(
               ^
   ```
   **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:341:** +3, including nesting 
penalty of 2, nesting level increased to 3
   ```cpp
               RETURN_IF_ERROR(
               ^
   ```
   **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:346:** +2, including nesting 
penalty of 1, nesting level increased to 2
   ```cpp
           if (read_rows > 0) {
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:349:** +3, including nesting 
penalty of 2, nesting level increased to 3
   ```cpp
               if (_get_push_down_agg_type() != TPushAggOp::type::COUNT) {
               ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:351:** +4, including nesting 
penalty of 3, nesting level increased to 4
   ```cpp
                   RETURN_IF_ERROR(_cast_to_input_block(block));
                   ^
   ```
   **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:351:** +5, including nesting 
penalty of 4, nesting level increased to 5
   ```cpp
                   RETURN_IF_ERROR(_cast_to_input_block(block));
                   ^
   ```
   **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:353:** +4, including nesting 
penalty of 3, nesting level increased to 4
   ```cpp
                   if (!_cur_reader->fill_all_columns()) {
                   ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:355:** +5, including nesting 
penalty of 4, nesting level increased to 5
   ```cpp
                       RETURN_IF_ERROR(_fill_columns_from_path(read_rows));
                       ^
   ```
   **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:355:** +6, including nesting 
penalty of 5, nesting level increased to 6
   ```cpp
                       RETURN_IF_ERROR(_fill_columns_from_path(read_rows));
                       ^
   ```
   **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:357:** +5, including nesting 
penalty of 4, nesting level increased to 5
   ```cpp
                       RETURN_IF_ERROR(_fill_missing_columns(read_rows));
                       ^
   ```
   **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:357:** +6, including nesting 
penalty of 5, nesting level increased to 6
   ```cpp
                       RETURN_IF_ERROR(_fill_missing_columns(read_rows));
                       ^
   ```
   **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:360:** +4, including nesting 
penalty of 3, nesting level increased to 4
   ```cpp
                   RETURN_IF_ERROR(_pre_filter_src_block());
                   ^
   ```
   **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:360:** +5, including nesting 
penalty of 4, nesting level increased to 5
   ```cpp
                   RETURN_IF_ERROR(_pre_filter_src_block());
                   ^
   ```
   **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:362:** +4, including nesting 
penalty of 3, nesting level increased to 4
   ```cpp
                   RETURN_IF_ERROR(_convert_to_output_block(block));
                   ^
   ```
   **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:362:** +5, including nesting 
penalty of 4, nesting level increased to 5
   ```cpp
                   RETURN_IF_ERROR(_convert_to_output_block(block));
                   ^
   ```
   **be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           if (UNLIKELY(!_status_.ok())) { \
           ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:365:** +4, including nesting 
penalty of 3, nesting level increased to 4
   ```cpp
                   RETURN_IF_ERROR(_truncate_char_or_varchar_columns(block));
                   ^
   ```
   **be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
       do {                                \
       ^
   ```
   **be/src/vec/exec/scan/vfile_scanner.cpp:365:** +5, including nesting 
penalty of 4, nesting level increased to 5
   ```cpp
                   RETURN_IF_ERROR(_truncate_char_or_varchar_columns(block));
                   ^
   ```
   **be/src/common/status.h:543:** 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