[opt](file-scanner) print current path when encountering error#34365
[opt](file-scanner) print current path when encountering error#34365morningman merged 1 commit intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
| // _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) { |
There was a problem hiding this comment.
warning: function '_get_block_wrapped' has cognitive complexity of 94 (threshold 50) [readability-function-cognitive-complexity]
Status VFileScanner::_get_block_wrapped(RuntimeState* state, Block* block, bool* eof) {
^Additional context
be/src/vec/exec/scan/vfile_scanner.cpp:321: +1, including nesting penalty of 0, nesting level increased to 1
do {
^be/src/vec/exec/scan/vfile_scanner.cpp:322: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_CANCELLED(state);
^be/src/runtime/runtime_state.h:769: expanded from macro 'RETURN_IF_CANCELLED'
do { \
^be/src/vec/exec/scan/vfile_scanner.cpp:322: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_CANCELLED(state);
^be/src/runtime/runtime_state.h:770: expanded from macro 'RETURN_IF_CANCELLED'
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
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
RETURN_IF_ERROR(_get_next_reader());
^be/src/common/status.h:541: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/vec/exec/scan/vfile_scanner.cpp:324: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(_get_next_reader());
^be/src/common/status.h:543: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/vec/exec/scan/vfile_scanner.cpp:327: +2, including nesting penalty of 1, nesting level increased to 2
if (_scanner_eof) {
^be/src/vec/exec/scan/vfile_scanner.cpp:335: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(_init_src_block(block));
^be/src/common/status.h:541: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/vec/exec/scan/vfile_scanner.cpp:335: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(_init_src_block(block));
^be/src/common/status.h:543: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/vec/exec/scan/vfile_scanner.cpp:341: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(
^be/src/common/status.h:541: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/vec/exec/scan/vfile_scanner.cpp:341: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(
^be/src/common/status.h:543: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/vec/exec/scan/vfile_scanner.cpp:346: +2, including nesting penalty of 1, nesting level increased to 2
if (read_rows > 0) {
^be/src/vec/exec/scan/vfile_scanner.cpp:349: +3, including nesting penalty of 2, nesting level increased to 3
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
RETURN_IF_ERROR(_cast_to_input_block(block));
^be/src/common/status.h:541: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/vec/exec/scan/vfile_scanner.cpp:351: +5, including nesting penalty of 4, nesting level increased to 5
RETURN_IF_ERROR(_cast_to_input_block(block));
^be/src/common/status.h:543: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/vec/exec/scan/vfile_scanner.cpp:353: +4, including nesting penalty of 3, nesting level increased to 4
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
RETURN_IF_ERROR(_fill_columns_from_path(read_rows));
^be/src/common/status.h:541: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/vec/exec/scan/vfile_scanner.cpp:355: +6, including nesting penalty of 5, nesting level increased to 6
RETURN_IF_ERROR(_fill_columns_from_path(read_rows));
^be/src/common/status.h:543: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/vec/exec/scan/vfile_scanner.cpp:357: +5, including nesting penalty of 4, nesting level increased to 5
RETURN_IF_ERROR(_fill_missing_columns(read_rows));
^be/src/common/status.h:541: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/vec/exec/scan/vfile_scanner.cpp:357: +6, including nesting penalty of 5, nesting level increased to 6
RETURN_IF_ERROR(_fill_missing_columns(read_rows));
^be/src/common/status.h:543: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/vec/exec/scan/vfile_scanner.cpp:360: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(_pre_filter_src_block());
^be/src/common/status.h:541: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/vec/exec/scan/vfile_scanner.cpp:360: +5, including nesting penalty of 4, nesting level increased to 5
RETURN_IF_ERROR(_pre_filter_src_block());
^be/src/common/status.h:543: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/vec/exec/scan/vfile_scanner.cpp:362: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(_convert_to_output_block(block));
^be/src/common/status.h:541: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/vec/exec/scan/vfile_scanner.cpp:362: +5, including nesting penalty of 4, nesting level increased to 5
RETURN_IF_ERROR(_convert_to_output_block(block));
^be/src/common/status.h:543: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/vec/exec/scan/vfile_scanner.cpp:365: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(_truncate_char_or_varchar_columns(block));
^be/src/common/status.h:541: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/vec/exec/scan/vfile_scanner.cpp:365: +5, including nesting penalty of 4, nesting level increased to 5
RETURN_IF_ERROR(_truncate_char_or_varchar_columns(block));
^be/src/common/status.h:543: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 183628 ms |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…e#34365) Like this: ``` mysql> select * from text_deflate; ERROR 1105 (HY000): errCode = 2, detailMessage = (172.21.0.101)[CANCELLED][INTERNAL_ERROR]cur path: hdfs://ns/usr/hive/warehouse/yytest.db/text_deflate/test2.snappy. Compressed file has been truncated, which is not allowed ```
…e#34365) Like this: ``` mysql> select * from text_deflate; ERROR 1105 (HY000): errCode = 2, detailMessage = (172.21.0.101)[CANCELLED][INTERNAL_ERROR]cur path: hdfs://ns/usr/hive/warehouse/yytest.db/text_deflate/test2.snappy. Compressed file has been truncated, which is not allowed ```
…e#34365) Like this: ``` mysql> select * from text_deflate; ERROR 1105 (HY000): errCode = 2, detailMessage = (172.21.0.101)[CANCELLED][INTERNAL_ERROR]cur path: hdfs://ns/usr/hive/warehouse/yytest.db/text_deflate/test2.snappy. Compressed file has been truncated, which is not allowed ```
…e#34365) Like this: ``` mysql> select * from text_deflate; ERROR 1105 (HY000): errCode = 2, detailMessage = (172.21.0.101)[CANCELLED][INTERNAL_ERROR]cur path: hdfs://ns/usr/hive/warehouse/yytest.db/text_deflate/test2.snappy. Compressed file has been truncated, which is not allowed ```
Proposed changes
Like this:
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...