slfan1989 opened a new issue, #2760:
URL: https://github.com/apache/iceberg-go/issues/2760
### Apache Iceberg version
main (development)
### Please describe the bug 🐞
`iceberg snapshots` drops fractional seconds from snapshot timestamps.
Copying a displayed timestamp into `iceberg rollback --timestamp` can select an
older snapshot.
### Steps to reproduce
1. Use a table with at least two snapshots. In the test fixture, snapshot
`200` is current and has timestamp `2019-04-12T20:29:15.770Z`. Its parent is
snapshot `100`.
2. Run `iceberg snapshots db.events`. The CLI displays
`2019-04-12T20:29:15Z` for snapshot `200`.
3. Pass the displayed timestamp to the rollback command. Check the proposed
snapshot ID in the confirmation prompt, then answer `n`.
```sh
iceberg rollback db.events --timestamp 2019-04-12T20:29:15Z
```
### Actual behavior
The rollback command resolves the displayed timestamp to snapshot `100`.
Truncating the milliseconds puts the timestamp before snapshot `200`.
### Expected behavior
Both text and JSON output from `iceberg snapshots` should preserve
millisecond precision. Passing the timestamp displayed for snapshot `200` to
`rollback --timestamp` should resolve to `200` for this table.
--
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]