nastra commented on a change in pull request #2957:
URL: https://github.com/apache/iceberg/pull/2957#discussion_r712816983



##########
File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
##########
@@ -500,11 +510,14 @@ public TableMetadata updateSchema(Schema newSchema, int 
newLastColumnId) {
       builder.add(new Schema(newSchemaId, newSchema.columns(), 
newSchema.identifierFieldIds()));
     }
 
-    return new TableMetadata(null, formatVersion, uuid, location,
-        lastSequenceNumber, System.currentTimeMillis(), newLastColumnId,
-        newSchemaId, builder.build(), defaultSpecId, updatedSpecs, 
lastAssignedPartitionId,
-        defaultSortOrderId, updatedSortOrders, properties, currentSnapshotId, 
snapshots, snapshotLog,
-        addPreviousFile(file, lastUpdatedMillis));
+    return builderFrom(this)

Review comment:
       yes I know that this is being added during `build()` but IMO this is 
rather counter-intuitive as it's not clear what's being set explicitly and 
what's being set implicitly.




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