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


##########
core/src/main/java/org/apache/iceberg/TableMetadataParser.java:
##########
@@ -436,16 +436,14 @@ static TableMetadata fromJson(String metadataLocation, 
JsonNode node) {
     long currentSnapshotId = JsonUtil.getLong(CURRENT_SNAPSHOT_ID, node);
     long lastUpdatedMillis = JsonUtil.getLong(LAST_UPDATED_MILLIS, node);
 
-    Map<String, SnapshotRef> refs;
+    SnapshotOperations.Builder snapshotOperationsBuilder = 
SnapshotOperations.buildFromEmpty();
+
     if (node.has(REFS)) {
-      refs = refsFromJson(node.get(REFS));
+      snapshotOperationsBuilder.refs(refsFromJson(node.get(REFS)));

Review Comment:
   Instead of passing a map back from `refsFromJson`, why not pass the 
`snapshotOperationsBuilder` to the parser method?



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