You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/08/29 21:13:53 UTC
[GitHub] [iceberg] rdblue commented on a change in pull request #2957: Core: introduce TableMetadataBuilder
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org