1fanwang commented on code in PR #3760:
URL: https://github.com/apache/iceberg-python/pull/3760#discussion_r3739934084


##########
pyiceberg/table/__init__.py:
##########
@@ -212,6 +213,9 @@ class TableProperties:
     MIN_SNAPSHOTS_TO_KEEP = "history.expire.min-snapshots-to-keep"
     MIN_SNAPSHOTS_TO_KEEP_DEFAULT = 1
 
+    MAX_REF_AGE_MS = "history.expire.max-ref-age-ms"
+    MAX_REF_AGE_MS_DEFAULT = sys.maxsize

Review Comment:
   Fixed in ca43097b. `sys.maxsize` is `2**31-1` on a 32-bit build, so the 
default would have been ~25 days rather than unbounded — pinned to `2**63-1` to 
match Java's `Long.MAX_VALUE`.



##########
tests/table/test_expire_snapshots.py:
##########
@@ -316,3 +322,126 @@ def 
test_update_remove_snapshots_with_statistics(table_v2_with_statistics: Table
     assert not any(stat.snapshot_id == REMOVE_SNAPSHOT for stat in 
new_metadata.statistics), (
         "Statistics for removed snapshot should be gone"
     )
+
+
+def _table_with_expired_branch(
+    catalog_with_warehouse: Catalog,
+    max_ref_age_ms: int,
+    table_properties: dict[str, str] | None = None,
+) -> tuple[Table, int]:
+    """Create a table with three snapshots and a branch on the oldest, then 
wait out its TTL.
+
+    Returns the reloaded table and the snapshot id the branch pins.
+    """
+    catalog_with_warehouse.create_namespace("expire_refs")

Review Comment:
   Fixed in ca43097b — each test now uses its own namespace. The collision does 
not actually occur today, since `catalog_with_warehouse` calls 
`destroy_tables()` on teardown, but the tests should not depend on that for 
isolation.



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