Skip to content

Commit 674a419

Browse files
committed
remove current_ancestors(), update test
1 parent a1ae5ca commit 674a419

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
@@ -1315,10 +1315,6 @@ def snapshot_as_of_timestamp(self, timestamp_ms: int, inclusive: bool = True) ->
13151315
return self.snapshot_by_id(log_entry.snapshot_id)
13161316
return None
13171317

1318-
def current_ancestors(self) -> Iterable[Snapshot]:
1319-
"""Get a list of ancestors of and including the current snapshot."""
1320-
return ancestors_of(self.current_snapshot(), self.metadata)
1321-
13221318
def history(self) -> List[SnapshotLogEntry]:
13231319
"""Get the snapshot history of this table."""
13241320
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)