rdblue commented on code in PR #19030:
URL: https://github.com/apache/iceberg/pull/19030#discussion_r4647723029


##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -286,25 +289,42 @@ public ThisT deleteWith(Consumer<String> deleteCallback) {
   protected void validate(TableMetadata currentMetadata, Snapshot snapshot) {}
 
   /**
-   * Apply the update's changes to the given metadata and snapshot. Return the 
new manifest list.
+   * Apply the update's changes to the given metadata and snapshot. Return the 
new version's
+   * manifests as a list.
    *
    * @param metadataToUpdate the base table metadata to apply changes to
-   * @param snapshot snapshot to apply the changes to
+   * @param snapshot snapshot to apply the changes to; will be the new 
snapshot's parent
    * @return a manifest list for the new snapshot.
    */
   protected abstract List<ManifestFile> apply(TableMetadata metadataToUpdate, 
Snapshot snapshot);
 
-  @Override
-  public Snapshot apply() {
-    refresh();
-    Snapshot parentSnapshot = SnapshotUtil.latestSnapshot(base, targetBranch);
-
-    long sequenceNumber = base.nextSequenceNumber();
-    Long parentSnapshotId = parentSnapshot == null ? null : 
parentSnapshot.snapshotId();
+  /** Result type for root file writes implemented by child operations. */
+  protected record NewSnapshotMetadata(

Review Comment:
   I think this is a reasonable name.



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