rdblue commented on a change in pull request #2957:
URL: https://github.com/apache/iceberg/pull/2957#discussion_r698071555
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadataParser.java
##########
@@ -403,9 +403,26 @@ static TableMetadata fromJson(FileIO io, InputFile file,
JsonNode node) {
}
}
- return new TableMetadata(file, formatVersion, uuid, location,
- lastSequenceNumber, lastUpdatedMillis, lastAssignedColumnId,
currentSchemaId, schemas, defaultSpecId, specs,
- lastAssignedPartitionId, defaultSortOrderId, sortOrders, properties,
currentVersionId,
- snapshots, entries.build(), metadataEntries.build());
+ return TableMetadata.builder()
Review comment:
What is the benefit of using the builder here instead of instantiating
`TableMetadata` directly? Looks like it made the method too long! I don't think
that this needs to use the builder because there isn't anything to validate or
change.
--
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]