Skip to content

Commit

Permalink
MINOR: ParquetRewriter must close opened reader/stream (#3002)
Browse files Browse the repository at this point in the history
  • Loading branch information
cetindogu authored Aug 31, 2024
1 parent fafd9b0 commit aec7bc6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private void openInputFiles(List<InputFile> inputFiles, ParquetConfiguration con
}

// Routines to get reader of next input file and set up relevant states
private void initNextReader() {
private void initNextReader() throws IOException {
if (reader != null) {
LOG.info("Finish rewriting input file: {}", reader.getFile());
}
Expand All @@ -252,7 +252,7 @@ private void initNextReader() {
originalCreatedBy = null;
return;
}

if (reader != null) reader.close();
reader = inputFiles.poll();
meta = reader.getFooter();
originalCreatedBy = meta.getFileMetaData().getCreatedBy();
Expand Down

0 comments on commit aec7bc6

Please sign in to comment.