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/11/29 18:21:49 UTC

[GitHub] [incubator-iceberg] aokolnychyi commented on a change in pull request #675: [WIP] Inherit snapshot ids

aokolnychyi commented on a change in pull request #675: [WIP] Inherit snapshot ids
URL: https://github.com/apache/incubator-iceberg/pull/675#discussion_r352220297
 
 

 ##########
 File path: api/src/main/java/org/apache/iceberg/ManifestFile.java
 ##########
 @@ -167,4 +174,11 @@ default boolean hasDeletedFiles() {
      */
     PartitionFieldSummary copy();
   }
+
+  // TODO: consider other approaches such as adding builders directly to GenericManifestFile
+  interface CopyBuilder {
 
 Review comment:
   The goal is to provide a generic way to enrich manifests with additional metadata without creating a new object every time we modify a field (snapshot id, sequence number). I've considered multiple ways to implement this. My original idea was to add a copy builder to `GenericManifestFile`. 
   
   ```
   GenericManifestFile.copy(manifest)
       .withSnapshotId(snapshotId)
       .build();
   ```
   
   Then I thought it would make sense to rely on the abstract interface instead. After I implemented this, the original idea seems not that bad as it allows us to keep `ManifestFile` untouched. I consider switching back.

----------------------------------------------------------------
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