laskoviymishka commented on code in PR #2794:
URL: https://github.com/apache/iceberg-go/pull/2794#discussion_r4771908248


##########
cmd/iceberg/snapshots.go:
##########
@@ -58,6 +58,10 @@ func validateRefType(refType string) error {
        }
 }
 
+func formatTimestampMillis(timestampMs int64) string {

Review Comment:
   Could `formatTimestampMillis` move next to `formatDurationMs` in 
`maintenance.go`? Three commands use it now, and `info.go` and 
`expire_snapshots.go` would no longer have to pull it out of `snapshots.go`.



##########
cmd/iceberg/expire_snapshots_test.go:
##########
@@ -95,8 +95,10 @@ func TestDiffSnapshots(t *testing.T) {
 
        require.Len(t, expired, 2)
        assert.Equal(t, int64(1), expired[0].SnapshotID)
+       assert.Equal(t, "2001-09-09T01:46:40.770Z", expired[0].Timestamp)
        assert.Equal(t, "append", expired[0].Operation)
        assert.Equal(t, int64(2), expired[1].SnapshotID)
+       assert.Equal(t, "2033-05-18T03:33:20.000Z", expired[1].Timestamp)

Review Comment:
   The render tests further down (lines 124, 149, 190) still hand-build entries 
with `2024-01-01T00:00:00Z`. The formatting itself is covered here, so we lose 
no coverage. Could those fixtures use the `.000Z` form so they match what 
`diffSnapshots` emits now?



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