mrutunjay-kinagi commented on code in PR #3062:
URL: https://github.com/apache/iceberg-python/pull/3062#discussion_r2822319715


##########
pyiceberg/table/update/__init__.py:
##########
@@ -442,6 +443,18 @@ def _(update: AddSnapshotUpdate, base_metadata: 
TableMetadata, context: _TableMe
             f"Cannot add snapshot with sequence number 
{update.snapshot.sequence_number} "
             f"older than last sequence number 
{base_metadata.last_sequence_number}"
         )
+    elif (
+        base_metadata.snapshot_log and update.snapshot.timestamp_ms - 
base_metadata.snapshot_log[-1].timestamp_ms < -ONE_MINUTE_MS
+    ):
+        raise ValueError(

Review Comment:
   Good point. I kept `ValueError` for consistency with the existing validation 
branches in this same method (sequence/row-id checks all currently raise 
`ValueError`). If you prefer, I can switch this validation path to 
`CommitFailedException` in a follow-up commit.



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