anoopj commented on code in PR #18884:
URL: https://github.com/apache/iceberg/pull/18884#discussion_r4543152344


##########
core/src/main/java/org/apache/iceberg/SnapshotParser.java:
##########
@@ -176,7 +182,62 @@ static Snapshot fromJson(JsonNode node) {
 
     String keyId = JsonUtil.getStringOrNull(KEY_ID, node);
 
-    if (node.has(MANIFEST_LIST)) {
+    return newSnapshot(
+        node,
+        sequenceNumber,
+        snapshotId,
+        parentId,
+        timestamp,
+        operation,
+        summary,
+        schemaId,
+        firstRowId,
+        addedRows,
+        keyId);
+  }
+
+  private static Snapshot newSnapshot(
+      JsonNode node,
+      long sequenceNumber,
+      long snapshotId,
+      Long parentId,
+      long timestamp,
+      String operation,
+      Map<String, String> summary,
+      Integer schemaId,
+      Long firstRowId,
+      Long addedRows,
+      String keyId) {
+    if (node.has(ROOT_MANIFEST)) {

Review Comment:
   Agreed, redundant. The reworked commit 1 drops that validation entirely to 
match #17523. 



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