porkedchop opened a new pull request, #4125: URL: https://github.com/apache/iceberg-python/pull/4125
# Rationale for this change The `AddSnapshotUpdate` handler only rejects a snapshot whose sequence number is not newer than the table's `last_sequence_number` when the format version is exactly 2, so on v3 tables a snapshot with a stale sequence number is accepted. Java's `TableMetadata.Builder.addSnapshot` applies this check for every format version after 1, so this changes `== 2` to `>= 2`. ## Are these changes tested? Yes, added `test_add_snapshot_update_fails_with_stale_sequence_number`, run against both the v2 and v3 table fixtures. The v3 case fails without the change. ## Are there any user-facing changes? Committing a snapshot with a stale sequence number to a v3 table now raises the same `ValueError` as on v2. -- 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]
