rdblue commented on a change in pull request #3480:
URL: https://github.com/apache/iceberg/pull/3480#discussion_r750500688



##########
File path: api/src/main/java/org/apache/iceberg/RewriteFiles.java
##########
@@ -73,4 +73,13 @@ RewriteFiles rewriteFiles(Set<DataFile> dataFilesToReplace, 
Set<DeleteFile> dele
    * @return this for method chaining
    */
   RewriteFiles validateFromSnapshot(long snapshotId);
+
+  /**
+   * Use the specified sequence number for the new manifest of the data files 
added in this update,
+   * instead of inheriting the sequence number of the snapshot that will be 
created.
+   *
+   * @param sequenceNumber a sequence number
+   * @return this for method chaining
+   */
+  RewriteFiles overrideSequenceNumberForNewDataFiles(long sequenceNumber);

Review comment:
       Good points about naming, but this still seems long to me. Maybe we 
should pass the sequence number in with the data files then?
   
   We could add `rewriteFiles(Iterable<DataFile> toRemove, Iterable<DataFile> 
toAdd, long sequenceNumber)`. I think that's a bit more clear because you don't 
remove files at a sequence number. We also don't have the problem that it is 
confusing for delete files because it is the data file method only.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to