Fokko commented on code in PR #312: URL: https://github.com/apache/iceberg-python/pull/312#discussion_r1468590647
########## pyiceberg/table/__init__.py: ########## @@ -2279,12 +2280,14 @@ class _MergingSnapshotProducer: _parent_snapshot_id: Optional[int] _added_data_files: List[DataFile] _commit_uuid: uuid.UUID + _branch: str - def __init__(self, operation: Operation, table: Table) -> None: + def __init__(self, operation: Operation, table: Table, branch: str) -> None: self._operation = operation self._table = table self._snapshot_id = table.new_snapshot_id() # Since we only support the main branch for now + self._branch = branch self._parent_snapshot_id = snapshot.snapshot_id if (snapshot := self._table.current_snapshot()) else None Review Comment: There is more involved than just setting the name of the branch. There we take the parent snapshot that's by default the parent of the current snapshot. The current snapshot is the HEAD of the main branch. Before adding this, I would love to see also some integration tests with Spark, and some tests that assert the snapshot-tree. -- 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