jackye1995 commented on a change in pull request #2957:
URL: https://github.com/apache/iceberg/pull/2957#discussion_r712340729
##########
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:
The previous file is added by default from the base metadata during
build, unless explicitly overwritten.
--
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]