You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/06/04 00:36:47 UTC

[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #201: Add appendManifest to AppendFiles API.

rdblue commented on a change in pull request #201: Add appendManifest to AppendFiles API.
URL: https://github.com/apache/incubator-iceberg/pull/201#discussion_r290088958
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/ManifestWriter.java
 ##########
 @@ -97,11 +112,53 @@ public void add(ManifestEntry entry) {
     writer.add(entry);
   }
 
+  /**
+   * Add an added entry for a data file.
+   * <p>
+   * The entry's snapshot ID will be this manifest's snapshot ID.
+   *
+   * @param addedFile a data file
+   */
   @Override
   public void add(DataFile addedFile) {
     // TODO: this assumes that file is a GenericDataFile that can be written directly to Avro
     // Eventually, this should check in case there are other DataFile implementations.
-    add(reused.wrapAppend(snapshotId, addedFile));
+    addEntry(reused.wrapAppend(snapshotId, addedFile));
+  }
+
+  public void add(ManifestEntry entry) {
+    addEntry(reused.wrapAppend(snapshotId, entry.file()));
+  }
+
+  /**
+   * Add an existing entry for a data file.
+   *
+   * @param existingFile a data file
+   * @param fileSnapshotId snapshot ID when the data file was added to the table
+   */
+  public void existing(DataFile existingFile, long fileSnapshotId) {
+    addEntry(reused.wrapAppend(fileSnapshotId, existingFile));
 
 Review comment:
   Looks like this should be wrapExisting.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org