dttung2905 commented on code in PR #1201:
URL: https://github.com/apache/iceberg-go/pull/1201#discussion_r3431350769


##########
table/snapshot_producers.go:
##########
@@ -809,7 +809,10 @@ func (sp *snapshotProducer) summary(props 
iceberg.Properties) (Summary, error) {
 
        var previousSnapshot *Snapshot
        if sp.parentSnapshotID > 0 {
-               previousSnapshot, _ = 
sp.txn.meta.SnapshotByID(sp.parentSnapshotID)
+               previousSnapshot, err = 
sp.txn.meta.SnapshotByID(sp.parentSnapshotID)
+               if err != nil {
+                       return Summary{}, fmt.Errorf("summary: lookup parent 
snapshot %d: %w", sp.parentSnapshotID, err)
+               }
        }
 
        var previousSummary iceberg.Properties

Review Comment:
   Thanks for the comment, I think you brought up a valid concern. I have added 
extra guard for it



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