ajantha-bhat commented on code in PR #6661: URL: https://github.com/apache/iceberg/pull/6661#discussion_r1184589305
########## core/src/main/java/org/apache/iceberg/PartitionsTable.java: ########## @@ -229,18 +281,41 @@ static class Partition { private int specId; private long dataRecordCount; private int dataFileCount; + private long posDeleteRecordCount; + private int posDeleteFileCount; + private long eqDeleteRecordCount; + private int eqDeleteFileCount; Partition(StructLike key) { this.key = key; this.specId = 0; this.dataRecordCount = 0; this.dataFileCount = 0; + this.posDeleteRecordCount = 0; + this.posDeleteFileCount = 0; + this.eqDeleteRecordCount = 0; + this.eqDeleteFileCount = 0; } - void update(DataFile file) { - this.dataRecordCount += file.recordCount(); - this.dataFileCount += 1; - this.specId = file.specId(); + void update(ContentFile<?> file) { + switch (file.content()) { + case DATA: + this.dataRecordCount += file.recordCount(); + this.dataFileCount += 1; + this.specId = file.specId(); + break; + case POSITION_DELETES: + this.posDeleteRecordCount = file.recordCount(); + this.posDeleteFileCount += 1; + break; Review Comment: For this partition value, while updating the data file count, the Spec id would have been updated. I don't think there will be delete files without data file entries. So, I assumed that again updating here would be redundant. WDYT? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org