[Improvement] Add parquet file name to the error message (#4954)
When a user tries to load parquet file into Doris, like this path: `hdfs://hadoop/user/data/date=20201024/*`, but acturally the path contains some none parquet files,the error is throwed `Couldn't deserialize thrift: No more data to read.\\nDeserializing page header failed.`. If the error message includes the file name information, we can quickly locate the errors. Therefore, this patch try to add the file name to the error message.
This commit is contained in:
@ -152,11 +152,17 @@ Status ParquetScanner::open_next_reader() {
|
||||
}
|
||||
|
||||
Status status = _cur_file_reader->init_parquet_reader(_src_slot_descs, _state->timezone());
|
||||
|
||||
|
||||
if (status.is_end_of_file()) {
|
||||
continue;
|
||||
} else {
|
||||
return status;
|
||||
if (!status.ok()) {
|
||||
std::stringstream ss;
|
||||
ss << " file: " << range.path << " error:" << status.get_error_msg();
|
||||
return Status::InternalError(ss.str());
|
||||
} else {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user