slfan1989 commented on code in PR #2761:
URL: https://github.com/apache/iceberg-go/pull/2761#discussion_r4746925750


##########
cmd/iceberg/snapshots_test.go:
##########
@@ -96,6 +96,23 @@ func TestBuildSnapshotEntries(t *testing.T) {
        assert.Nil(t, entries[1].ParentSnapshotID)
 }
 
+func TestSnapshotTimestampRoundTripsThroughRollback(t *testing.T) {
+       tbl := upgradeRollbackTestTable(t)
+       entry := buildSnapshotEntries(tbl)[0]
+       require.Equal(t, int64(200), entry.SnapshotID)
+
+       snapshotID, err := resolveRollbackSnapshotID(tbl, &RollbackCmd{
+               TableID:   "db.events",
+               Timestamp: entry.Timestamp,
+       })
+       require.NoError(t, err)
+       require.Equal(t, entry.SnapshotID, snapshotID)

Review Comment:
   Thanks for the review, @laskoviymishka!
   
   I've addressed both suggestions:
   • `iceberg snapshots` now always prints three millisecond digits in both 
text and JSON formats.
   • Added a regression test to verify the exact `.770Z` output and confirm 
that passing it to `rollback -- timestamp` correctly selects snapshot `200`.
   
   I also opened #2775 to track the same formatting changes for `expire 
snapshots` and `info`.



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