diff --git a/be/src/vec/exec/scan/file_scanner.cpp b/be/src/vec/exec/scan/file_scanner.cpp index 41fe77c1a729e1..25deb1a8a3e695 100644 --- a/be/src/vec/exec/scan/file_scanner.cpp +++ b/be/src/vec/exec/scan/file_scanner.cpp @@ -150,6 +150,8 @@ Status FileScanner::init(RuntimeState* state, const VExprContextSPtrs& conjuncts ADD_COUNTER_WITH_LEVEL(_local_state->scanner_profile(), "EmptyFileNum", TUnit::UNIT, 1); _not_found_file_counter = ADD_COUNTER_WITH_LEVEL(_local_state->scanner_profile(), "NotFoundFileNum", TUnit::UNIT, 1); + _fully_skipped_file_counter = ADD_COUNTER_WITH_LEVEL(_local_state->scanner_profile(), + "FullySkippedFileNum", TUnit::UNIT, 1); _file_counter = ADD_COUNTER_WITH_LEVEL(_local_state->scanner_profile(), "FileNumber", TUnit::UNIT, 1); @@ -451,6 +453,10 @@ Status FileScanner::_get_block_wrapped(RuntimeState* state, Block* block, bool* _cur_reader_eof = true; COUNTER_UPDATE(_not_found_file_counter, 1); continue; + } else if (st.is()) { + _cur_reader_eof = true; + COUNTER_UPDATE(_fully_skipped_file_counter, 1); + continue; } else if (!st) { return st; } diff --git a/be/src/vec/exec/scan/file_scanner.h b/be/src/vec/exec/scan/file_scanner.h index 445343fa8e2ffc..1a44d06c77b6e8 100644 --- a/be/src/vec/exec/scan/file_scanner.h +++ b/be/src/vec/exec/scan/file_scanner.h @@ -210,6 +210,7 @@ class FileScanner : public Scanner { RuntimeProfile::Counter* _runtime_filter_partition_prune_timer = nullptr; RuntimeProfile::Counter* _empty_file_counter = nullptr; RuntimeProfile::Counter* _not_found_file_counter = nullptr; + RuntimeProfile::Counter* _fully_skipped_file_counter = nullptr; RuntimeProfile::Counter* _file_counter = nullptr; RuntimeProfile::Counter* _file_read_bytes_counter = nullptr; RuntimeProfile::Counter* _file_read_calls_counter = nullptr;