Skip to content

Commit

Permalink
Remove duplicate code
Browse files Browse the repository at this point in the history
The stream traversal is done already earlier in the method, reuse.
  • Loading branch information
findepi committed Aug 2, 2023
1 parent ca6fc78 commit 0aa3da0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2225,9 +2225,7 @@ private void cleanupFailedWrite(ConnectorSession session, String tableLocation,
}
catch (Exception e) {
// Can be safely ignored since a VACUUM from DeltaLake will take care of such orphaned files
LOG.warn(e, "Failed cleanup of leftover files from failed write, files are: %s", dataFiles.stream()
.map(dataFileInfo -> appendPath(tableLocation, dataFileInfo.getPath()))
.collect(toImmutableList()));
LOG.warn(e, "Failed cleanup of leftover files from failed write, files are: %s", filesToDelete);
}
}

Expand Down

0 comments on commit 0aa3da0

Please sign in to comment.