Revanth14 opened a new pull request, #1170:
URL: https://github.com/apache/iceberg-go/pull/1170

   Fixes #1166.
   
   ## Summary
   - Add `iceberg rollback <table-id> --timestamp <RFC3339>` to roll back to 
the snapshot current as of a given time.
   - Make `--snapshot-id` and `--timestamp` mutually exclusive, exactly one 
required(`--snapshot-id` goes from required to optional; existing usage is 
unchanged).
   - Resolve the timestamp via the existing `Table.SnapshotAsOf(timestampMs, 
true)` and feed the resolved ID into the existing rollback flow, preserving the 
ancestor check, `AssertRefSnapshotID` guard, and confirmation prompt.
   - Validate the selector before catalog init, so invalid usage returns a 
clear message instead of a catalog connection error.
   
   Timestamp resolution follows the snapshot **log** (main lineage), matching 
PyIceberg/Spark semantics, so a snapshot never on the main lineage isn't 
selectable by timestamp (intentional), and no snapshot at/before `t` errors 
clearly rather than rolling back to nothing.
   
   ## Testing
   - `env GOCACHE=/private/tmp/iceberg-go-gocache go test ./cmd/iceberg 
-count=1`
   - `env GOCACHE=/private/tmp/iceberg-go-gocache go vet ./cmd/iceberg`
   - `gofmt -l cmd/iceberg`
   - `git diff --check`


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