chenjunjiedada commented on a change in pull request #845: Add persistent IDs
to partition fields
URL: https://github.com/apache/incubator-iceberg/pull/845#discussion_r402947754
##########
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:
How about the forward compatibility? Is it possible that an old reader reads
the new spec? then it still parses the new spec field id start from 1000?
----------------------------------------------------------------
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]