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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]