chenjunjiedada commented on a change in pull request #675: Inherit snapshot ids
for manifest entries
URL: https://github.com/apache/incubator-iceberg/pull/675#discussion_r370937666
##########
File path: core/src/main/java/org/apache/iceberg/BaseRewriteManifests.java
##########
@@ -129,17 +134,23 @@ public RewriteManifests deleteManifest(ManifestFile
manifest) {
@Override
public RewriteManifests addManifest(ManifestFile manifest) {
- try {
- // the appended manifest must be rewritten with this update's snapshot ID
- addedManifests.add(copyManifest(manifest));
- } catch (IllegalArgumentException e) {
- throw new IllegalArgumentException("Cannot append manifest: " +
e.getMessage());
+ Preconditions.checkArgument(!manifest.hasAddedFiles(), "Cannot add
manifest with added files");
+ Preconditions.checkArgument(!manifest.hasDeletedFiles(), "Cannot add
manifest with deleted files");
+ Preconditions.checkArgument(manifest.snapshotId() == null, "Snapshot id
must be assigned during commit");
Review comment:
@rdblue , do you mean the Flink writer writes snapshot with ID -1 in
checkpoint?
----------------------------------------------------------------
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]