prodeezy commented on a change in pull request #695: Cherrypick snapshot feature
URL: https://github.com/apache/incubator-iceberg/pull/695#discussion_r370288693
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
##########
@@ -589,4 +603,20 @@ private static PartitionSpec freshSpec(int specId, Schema
schema, PartitionSpec
}
return builder.build();
}
+
+ private static String publishedWapId(Snapshot snapshot) {
Review comment:
I commented on this elsewhere in SnapshotManager .. mentioning it here..
I'v moved `isWapIdPublished()` to a `WapUtil` class (which is now used by
SnapshotManager.apply ). Although, we want to keep the complexity of the check
to O(1), so a `snapshotsByWapId` (or equivalent) index would need to be built
once for each table state. Additionally, Util classes shouldn't be keeping
state, as a consequence i'v exposed snapshotsByWapId() as is in TableMetadata
which is used by WapUtil from within the convenience method: isWapIdPublished.
So the state is maintained by TableMeta but the explicit check is performed by
WapUtil.. Lemme know what you think. These two private methods now that they
are only used to build the index in TableMeta.
----------------------------------------------------------------
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]