kevinjqliu commented on code in PR #2408:
URL: https://github.com/apache/iceberg-python/pull/2408#discussion_r2314501601
##########
pyiceberg/manifest.py:
##########
@@ -1087,18 +1087,16 @@ def add_entry(self, entry: ManifestEntry) ->
ManifestWriter:
return self
def add(self, entry: ManifestEntry) -> ManifestWriter:
- if entry.sequence_number is not None and entry.sequence_number >= 0:
- self.add_entry(
- ManifestEntry.from_args(
- snapshot_id=self._snapshot_id,
sequence_number=entry.sequence_number, data_file=entry.data_file
- )
- )
- else:
- self.add_entry(
- ManifestEntry.from_args(
- status=ManifestEntryStatus.ADDED,
snapshot_id=self._snapshot_id, data_file=entry.data_file
- )
+ self.add_entry(
+ ManifestEntry.from_args(
+ status=ManifestEntryStatus.ADDED,
+ snapshot_id=self._snapshot_id,
+ sequence_number=entry.sequence_number if
entry.file_sequence_number != UNASSIGNED_SEQ else None,
Review Comment:
UNASSIGNED_SEQ is -1, which is what the previous logic was checking
https://github.com/apache/iceberg-python/blob/e4849edbbb79df2ebeeb8f4c6ef1cfab8213355a/pyiceberg/manifest.py#L61
--
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]