Skip to content

Commit a316bac

Browse files
committed
remove current_ancestors(), update test
1 parent f7c1a60 commit a316bac

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

pyiceberg/table/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,10 +1303,6 @@ def snapshot_as_of_timestamp(self, timestamp_ms: int, inclusive: bool = True) ->
13031303
return self.snapshot_by_id(log_entry.snapshot_id)
13041304
return None
13051305

1306-
def current_ancestors(self) -> Iterable[Snapshot]:
1307-
"""Get a list of ancestors of and including the current snapshot."""
1308-
return ancestors_of(self.current_snapshot(), self.metadata)
1309-
13101306
def history(self) -> List[SnapshotLogEntry]:
13111307
"""Get the snapshot history of this table."""
13121308
return self.metadata.snapshot_log

tests/table/test_init.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
Operation,
7676
Snapshot,
7777
SnapshotLogEntry,
78-
Summary,
78+
Summary, ancestors_of,
7979
)
8080
from pyiceberg.table.sorting import (
8181
NullOrder,
@@ -217,8 +217,8 @@ def test_snapshot_by_timestamp(table_v2: Table) -> None:
217217
assert table_v2.snapshot_as_of_timestamp(1515100955770, inclusive=False) is None
218218

219219

220-
def test_current_ancestors(table_v2: Table) -> None:
221-
assert list(table_v2.current_ancestors()) == [
220+
def test_ancestors_of(table_v2: Table) -> None:
221+
assert list(ancestors_of(table_v2.current_snapshot(), table_v2.metadata)) == [
222222
Snapshot(
223223
snapshot_id=3055729675574597004,
224224
parent_snapshot_id=3051729675574597004,

0 commit comments

Comments
 (0)