jaideeppyne opened a new pull request, #19130: URL: https://github.com/apache/iceberg/pull/19130
## What `UPDATE` and `MERGE INTO` on a tag or snapshot selector are rejected on Spark 3.5 and 4.0, the same way `INSERT` and `DELETE` already are. Fixes #19118. ## Why `db.t.tag_<name>` and `db.t.snapshot_id_<id>` load the table at that snapshot. `INSERT` and `DELETE` refuse to write there. `UPDATE` and `MERGE` did not, so they committed an overwrite of the current table and left the tag pointing at the old snapshot. Spark 4.1 and 4.2 already reject time travel in `newRowLevelOperationBuilder`. This applies that guard on the two versions that still take a snapshot id. ## How `newRowLevelOperationBuilder` now requires `snapshotId == null` before building the row-level operation. A branch selector is unchanged, because a branch is not a fixed snapshot. ## Tests `TestCopyOnWriteUpdate` and `TestMergeOnReadUpdate` on Spark 3.5 (`2.12`) and Spark 4.0 (`2.13`). Each run rejects `UPDATE` by snapshot id, `UPDATE` by tag, and `MERGE` by snapshot id, then checks that the current snapshot id and the row are unchanged. Copy-on-write and merge-on-read, across the Hive and REST catalogs in the template: 12 passing cases, 0 failures. -- 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]
