Fokko commented on code in PR #2129:
URL: https://github.com/apache/iceberg-python/pull/2129#discussion_r2446810377
##########
tests/table/test_snapshots.py:
##########
@@ -139,15 +139,15 @@ def
test_deserialize_snapshot_with_properties(snapshot_with_properties: Snapshot
def test_snapshot_repr(snapshot: Snapshot) -> None:
assert (
repr(snapshot)
- == """Snapshot(snapshot_id=25, parent_snapshot_id=19,
sequence_number=200, timestamp_ms=1602638573590,
manifest_list='s3:/a/b/c.avro', summary=Summary(Operation.APPEND),
schema_id=3)"""
+ == """Snapshot(snapshot_id=25, parent_snapshot_id=19,
sequence_number=200, timestamp_ms=1602638573590,
manifest_list='s3:/a/b/c.avro', summary=Summary(Operation.APPEND), schema_id=3,
first_row_id=None)"""
Review Comment:
In pydantic you can exclude fields from serialization if they are none. I
think for `first_row_id` that would be a good option 👍
##########
tests/table/test_snapshots.py:
##########
@@ -139,15 +139,15 @@ def
test_deserialize_snapshot_with_properties(snapshot_with_properties: Snapshot
def test_snapshot_repr(snapshot: Snapshot) -> None:
assert (
repr(snapshot)
- == """Snapshot(snapshot_id=25, parent_snapshot_id=19,
sequence_number=200, timestamp_ms=1602638573590,
manifest_list='s3:/a/b/c.avro', summary=Summary(Operation.APPEND),
schema_id=3)"""
+ == """Snapshot(snapshot_id=25, parent_snapshot_id=19,
sequence_number=200, timestamp_ms=1602638573590,
manifest_list='s3:/a/b/c.avro', summary=Summary(Operation.APPEND), schema_id=3,
first_row_id=None)"""
Review Comment:
In pydantic you can exclude fields from serialization if they are none. I
think for `first_row_id` that would be a good thing to do 👍
--
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]