github-actions[bot] commented on code in PR #29803:
URL: https://github.com/apache/doris/pull/29803#discussion_r1447161064
##########
be/src/vec/exec/scan/vfile_scanner.cpp:
##########
@@ -309,6 +310,7 @@ Status VFileScanner::open(RuntimeState* state) {
// _convert_to_output_block - - - - -
- x
Status VFileScanner::_get_block_impl(RuntimeState* state, Block* block, bool*
eof) {
Review Comment:
warning: function '_get_block_impl' has cognitive complexity of 94
(threshold 50) [readability-function-cognitive-complexity]
```cpp
Status VFileScanner::_get_block_impl(RuntimeState* state, Block* block,
bool* eof) {
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/exec/scan/vfile_scanner.cpp:311:** +1, including nesting
penalty of 0, nesting level increased to 1
```cpp
do {
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:312:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
RETURN_IF_CANCELLED(state);
^
```
**be/src/runtime/runtime_state.h:698:** expanded from macro
'RETURN_IF_CANCELLED'
```cpp
do {
\
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:312:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_CANCELLED(state);
^
```
**be/src/runtime/runtime_state.h:699:** expanded from macro
'RETURN_IF_CANCELLED'
```cpp
if (UNLIKELY((state)->is_cancelled())) return
Status::Cancelled("Cancelled"); \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:313:** +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:314:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_get_next_reader());
^
```
**be/src/common/status.h:526:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:314:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(_get_next_reader());
^
```
**be/src/common/status.h:528:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:317:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (_scanner_eof) {
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:325:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(_init_src_block(block));
^
```
**be/src/common/status.h:526:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:325:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_init_src_block(block));
^
```
**be/src/common/status.h:528:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:331:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(
^
```
**be/src/common/status.h:526:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:331:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(
^
```
**be/src/common/status.h:528:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:336:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (read_rows > 0) {
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:339:** +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:341:** +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:526:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:341:** +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:528:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:343:** +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:345:** +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:526:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:345:** +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:528:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:347:** +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:526:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:347:** +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:528:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:350:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(_pre_filter_src_block());
^
```
**be/src/common/status.h:526:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:350:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_pre_filter_src_block());
^
```
**be/src/common/status.h:528:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:352:** +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:526:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:352:** +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:528:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:355:** +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:526:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/scan/vfile_scanner.cpp:355:** +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:528:** 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]