ajantha-bhat commented on code in PR #12550: URL: https://github.com/apache/iceberg/pull/12550#discussion_r1998458533
########## data/src/main/java/org/apache/iceberg/data/PartitionStatsHandler.java: ########## @@ -61,30 +61,29 @@ public class PartitionStatsHandler { private PartitionStatsHandler() {} - public enum Column { - PARTITION(0), - SPEC_ID(1), - DATA_RECORD_COUNT(2), - DATA_FILE_COUNT(3), - TOTAL_DATA_FILE_SIZE_IN_BYTES(4), - POSITION_DELETE_RECORD_COUNT(5), - POSITION_DELETE_FILE_COUNT(6), - EQUALITY_DELETE_RECORD_COUNT(7), - EQUALITY_DELETE_FILE_COUNT(8), - TOTAL_RECORD_COUNT(9), - LAST_UPDATED_AT(10), - LAST_UPDATED_SNAPSHOT_ID(11); - - private final int id; - - Column(int id) { - this.id = id; - } - - public int id() { - return id; - } - } + public static final int PARTITION_FIELD_ID = 0; Review Comment: `PartitionStats.set(pos, value)` was based on enum ordinal before (starts from zero). Now that we don't have ordinal, I have used field_id instead as `field_id-1` may look odd. I even thought of updating the `PartitionStats.set(pos, value)` to set from 1, but all of the places `Structlike` starts from 0. So, didn't went with that path. -- 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