jackye1995 commented on code in PR #6965:
URL: https://github.com/apache/iceberg/pull/6965#discussion_r1129077129


##########
core/src/main/java/org/apache/iceberg/util/SnapshotUtil.java:
##########
@@ -397,6 +397,52 @@ public static Schema schemaFor(Table table, Long 
snapshotId, Long timestampMilli
     return table.schema();
   }
 
+  /**
+   * Return the schema of the snapshot at a given branch.
+   *
+   * <p>If branch does not exist, the table schema is returned because it will 
be the schema when

Review Comment:
   The logic here for both finding schema and latest snapshot allows branch to 
be non existing. The reason I decided to do this way is because the core 
library will still allow auto-creation of branch, so it makes more sense to 
support that case for these util methods. We only block writing to non-existing 
branch through table identifier in Spark module, but we will support other 
cases like WAP branch that will leverage the core feature.



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