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


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -343,11 +343,15 @@ public String toString() {
     // changes are carried through until metadata is read from a file
     this.changes = changes;
 
-    this.snapshotsById = indexAndValidateSnapshots(snapshots, 
lastSequenceNumber);
+    this.snapshotsById =
+        this.snapshots != null
+            ? indexAndValidateSnapshots(this.snapshots, lastSequenceNumber)
+            : ImmutableMap.of();

Review Comment:
   Why does this need to change `TableMetadata`? I think it can be dangerous if 
now there are cases where `snapshots` is null and that doesn't represent the 
actual table state. If I understand the intent of this PR, it is to have an 
alternative to `TableMetadata` that suppresses some information.



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