Fokko commented on PR #1772:
URL: https://github.com/apache/iceberg-python/pull/1772#issuecomment-2740745140
Let's add some tests as well:
```python
@pytest.mark.integration
@pytest.mark.parametrize("format_version", [1, 2])
def test_conflict(
spark: SparkSession, session_catalog: Catalog, arrow_table_with_null:
pa.Table, format_version: int
) -> None:
identifier = "default.test_conflict"
tbl1 = _create_table(session_catalog, identifier, {"format-version":
"1"}, [arrow_table_with_null])
tbl2 = session_catalog.load_table(identifier)
tbl1.delete("string == 'z'")
with pytest.raises(CommitFailedException, match="(branch main has
changed: expected id ).*"):
# tbl2 isn't aware of the commit by tbl1
tbl2.delete("string == 'z'")
```
--
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]