Skip to content

Commit

Permalink
[BugFix] Handle parquet exception in sync parquet file writer (StarRo…
Browse files Browse the repository at this point in the history
…cks#39734)

Signed-off-by: Letian Jiang <letian.jiang@outlook.com>
  • Loading branch information
letian-jiang authored Jan 23, 2024
1 parent 250b06e commit c9c798a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion be/src/formats/parquet/file_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,12 @@ Status SyncFileWriter::close() {
}

RETURN_IF_ERROR(_flush_row_group());
_writer->Close();
try {
_writer->Close();
} catch (const ::parquet::ParquetStatusException& e) {
LOG(WARNING) << "close writer error: " << e.what();
return Status::IOError(fmt::format("{}: {}", "close writer error", e.what()));
}

auto arrow_st = _outstream->Close();
if (!arrow_st.ok()) {
Expand Down

0 comments on commit c9c798a

Please sign in to comment.