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_r403270004
##########
File path: core/src/main/java/org/apache/iceberg/PartitionSpecParser.java
##########
@@ -147,7 +156,12 @@ private static void
buildFromJsonFields(PartitionSpec.Builder builder, JsonNode
String transform = JsonUtil.getString(TRANSFORM, element);
int sourceId = JsonUtil.getInt(SOURCE_ID, element);
- builder.add(sourceId, name, transform);
+ // partition field ids are missing in old PartitionSpec, they always
auto-increment from PARTITION_DATA_ID_START
+ if (!hasFieldId) {
Review comment:
Instead of making these changes here, I think that this should be verified
in `TableMetadata`. That would accomplish the same thing, but make it easier to
check the table version.
----------------------------------------------------------------
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]