rdblue commented on a change in pull request #845: Add persistent IDs to
partition fields
URL: https://github.com/apache/incubator-iceberg/pull/845#discussion_r403220969
##########
File path: api/src/main/java/org/apache/iceberg/PartitionSpec.java
##########
@@ -307,11 +312,16 @@ public static Builder builderFor(Schema schema) {
private final Set<String> partitionNames = Sets.newHashSet();
private Map<Integer, PartitionField> timeFields = Maps.newHashMap();
private int specId = 0;
+ private int lastAssignedFieldId = PARTITION_DATA_ID_START - 1;
Review comment:
We tend to prefer using `AtomicInteger` instead of an `int` field. That way
it is more clear because the calls are `incrementAndGet` or `getAndIncrement`.
That would also avoid the need to start at `PARTITION_DATA_ID_START - 1`. You
could use the constant to initialize and assign using `getAndIncrement`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]