kevinjqliu commented on code in PR #2879:
URL: https://github.com/apache/iceberg-python/pull/2879#discussion_r2717877028


##########
pyiceberg/table/update/snapshot.py:
##########
@@ -1008,6 +1009,26 @@ def rollback_to_snapshot(self, snapshot_id: int) -> 
ManageSnapshots:
 
         return self.set_current_snapshot(snapshot_id=snapshot_id)
 
+    def rollback_to_timestamp(self, timestamp_ms: int) -> ManageSnapshots:

Review Comment:
   could be useful helper, but i think we use `timestamp_ms` in most places 
right now



##########
pyiceberg/table/snapshots.py:
##########
@@ -472,3 +472,24 @@ def ancestors_between(from_snapshot: Snapshot | None, 
to_snapshot: Snapshot, tab
                 break
     else:
         yield from ancestors_of(to_snapshot, table_metadata)
+
+
+def latest_ancestor_before_timestamp(table_metadata: TableMetadata, 
timestamp_ms: int) -> Snapshot | None:

Review Comment:
   i think we _could_ refactor `ancestors_of` with an optional lambda. :P 



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