Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion be/src/vec/exec/format/orc/vorc_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ Status OrcReader::_create_file_reader() {
if (_io_ctx && _io_ctx->should_stop && _err_msg == "stop") {
return Status::EndOfFile("stop");
}
if (_err_msg.find("No such file or directory") != std::string::npos) {
// one for fs, the other is for oss.
if (_err_msg.find("No such file or directory") != std::string::npos ||
_err_msg.find("NoSuchKey") != std::string::npos) {
return Status::NotFound(_err_msg);
}
return Status::InternalError("Init OrcReader failed. reason = {}", _err_msg);
Expand Down
16 changes: 11 additions & 5 deletions be/src/vec/exec/scan/vfile_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -939,13 +939,19 @@ Status VFileScanner::_get_next_reader() {
}

COUNTER_UPDATE(_file_counter, 1);
if (init_status.is<END_OF_FILE>() || init_status.is<ErrorCode::NOT_FOUND>()) {
// The VFileScanner for external table may try to open not exist files,
// Because FE file cache for external table may out of date.
// So, NOT_FOUND for VFileScanner is not a fail case.
// Will remove this after file reader refactor.
// The VFileScanner for external table may try to open not exist files,
// Because FE file cache for external table may out of date.
// So, NOT_FOUND for VFileScanner is not a fail case.
// Will remove this after file reader refactor.
if (init_status.is<END_OF_FILE>()) {
COUNTER_UPDATE(_empty_file_counter, 1);
continue;
} else if (init_status.is<ErrorCode::NOT_FOUND>()) {
if (config::ignore_not_found_file_in_external_table) {
COUNTER_UPDATE(_not_found_file_counter, 1);
continue;
}
return Status::InternalError("failed to find reader, err: {}", init_status.to_string());
} else if (!init_status.ok()) {
return Status::InternalError("failed to init reader, err: {}", init_status.to_string());
}
Expand Down