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


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1081,8 +1094,18 @@ public Builder setCurrentSchema(int schemaId) {
       return this;
     }
 
+    public Builder addSchema(Schema schema) {
+      addSchemaInternal(schema, schema.highestFieldId());

Review Comment:
   I think this needs to be `Math.max(lastColumnId, schema.highestFieldId())` 
because the new schema could drop a column.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to