Skip to content

Commit 91637db

Browse files
committed
Address comments
1 parent 9cfe5ab commit 91637db

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

core/src/main/java/org/apache/iceberg/PartitionStats.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,12 @@ public void appendStats(PartitionStats entry) {
159159
this.equalityDeleteRecordCount += entry.equalityDeleteRecordCount;
160160
this.equalityDeleteFileCount += entry.equalityDeleteFileCount;
161161

162-
if (totalRecordCount == null) {
163-
this.totalRecordCount = entry.totalRecordCount;
164-
} else {
165-
this.totalRecordCount += entry.totalRecordCount;
162+
if (entry.totalRecordCount != null) {
163+
if (totalRecordCount == null) {
164+
this.totalRecordCount = entry.totalRecordCount;
165+
} else {
166+
this.totalRecordCount += entry.totalRecordCount;
167+
}
166168
}
167169

168170
if (entry.lastUpdatedAt != null) {

0 commit comments

Comments
 (0)