Fokko commented on code in PR #524: URL: https://github.com/apache/iceberg-python/pull/524#discussion_r1528301582
########## tests/integration/test_writes.py: ########## @@ -664,3 +668,55 @@ def test_table_properties_raise_for_none_value( session_catalog, identifier, {"format-version": format_version, **property_with_none}, [arrow_table_with_null] ) assert "None type is not a supported value in properties: property_name" in str(exc_info.value) + + +@pytest.mark.integration +@pytest.mark.parametrize("format_version", [1, 2]) +def test_inspect_snapshots( + spark: SparkSession, session_catalog: Catalog, arrow_table_with_null: pa.Table, format_version: int +) -> None: + identifier = "default.table_metadata_snapshots" + tbl = _create_table(session_catalog, identifier, properties={"format-version": format_version}) + + tbl.overwrite(arrow_table_with_null) + # should produce a DELETE entry + tbl.overwrite(arrow_table_with_null) + # Since we don't rewrite, this should produce a new manifest with an ADDED entry + tbl.append(arrow_table_with_null) + + df = tbl.inspect.snapshots() Review Comment: That was an excellent suggestion and actually caught a bug 🙌 -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org