smaheshwar-pltr commented on code in PR #2031:
URL: https://github.com/apache/iceberg-python/pull/2031#discussion_r2101322950
##########
pyiceberg/table/snapshots.py:
##########
@@ -440,11 +440,40 @@ def ancestors_of(current_snapshot: Optional[Snapshot],
table_metadata: TableMeta
def ancestors_between(
from_snapshot: Optional[Snapshot], to_snapshot: Snapshot, table_metadata:
TableMetadata
) -> Iterable[Snapshot]:
- """Get the ancestors of and including the given snapshot between the to
and from snapshots."""
+ """Get the ancestors of and including the given snapshot between the to
and from snapshots, both inclusively."""
if from_snapshot is not None:
for snapshot in ancestors_of(to_snapshot, table_metadata):
yield snapshot
if snapshot == from_snapshot:
break
else:
yield from ancestors_of(to_snapshot, table_metadata)
+
+
+def ancestors_between_ids(
+ from_snapshot_id_exclusive: Optional[int],
+ to_snapshot_id_inclusive: int,
Review Comment:
I realise these semantics are confusing given that `ancestors_between` above
is inclusive-inclusive
--
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]