kevinjqliu commented on code in PR #2408:
URL: https://github.com/apache/iceberg-python/pull/2408#discussion_r2314582646
##########
pyiceberg/manifest.py:
##########
@@ -1087,18 +1087,15 @@ 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:
```suggestion
sequence_number=entry.sequence_number if
entry.sequence_number != UNASSIGNED_SEQ else None,
```
should we check `sequence_number` instead?
https://github.com/apache/iceberg-python/blob/38c569b51b909c0b14f07b972a4a4783dbf7868c/pyiceberg/manifest.py#L1049
--
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]