Skip to content

Commit

Permalink
Merge pull request #7 from PickBas/fix-8810-mr
Browse files Browse the repository at this point in the history
[ISSUE #8810] mr/*: replaced .size() > 0 with isEmpty()
  • Loading branch information
PickBas authored Oct 13, 2023
2 parents 54cb4fc + 39f5ba6 commit 00e0b25
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public void abortJob(JobContext originalContext, int status) throws IOException
dataFiles(fileExecutor, table.location(), jobContext, table.io(), false);

// Check if we have files already committed and remove data files if there are any
if (dataFiles.size() > 0) {
if (!dataFiles.isEmpty()) {
Tasks.foreach(dataFiles)
.retry(3)
.suppressFailureWhenFinished()
Expand Down Expand Up @@ -327,7 +327,7 @@ private void commitTable(

Collection<DataFile> dataFiles = dataFiles(executor, location, jobContext, io, true);

if (dataFiles.size() > 0) {
if (!dataFiles.isEmpty()) {
// Appending data files to the table
AppendFiles append = table.newAppend();
dataFiles.forEach(append::appendFile);
Expand Down

0 comments on commit 00e0b25

Please sign in to comment.