From ee98e40f6f8f5beeff49a6bfcfa151a16a021bc6 Mon Sep 17 00:00:00 2001 From: Fokko Driesprong Date: Wed, 25 Oct 2023 09:06:43 -0400 Subject: [PATCH] Fix the nullability of `snapshot-id` on `AssertRefSnapshotId` It is not super clear from the current structure: https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.py#L304-L329 This is because I had to deconstruct the object. It would be great to get https://github.com/apache/iceberg/pull/7710 in --- pyiceberg/table/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyiceberg/table/__init__.py b/pyiceberg/table/__init__.py index 53ffdbb22a..ae35b34384 100644 --- a/pyiceberg/table/__init__.py +++ b/pyiceberg/table/__init__.py @@ -374,7 +374,7 @@ class AssertRefSnapshotId(TableRequirement): type: Literal["assert-ref-snapshot-id"] = Field(default="assert-ref-snapshot-id") ref: str - snapshot_id: int = Field(..., alias="snapshot-id") + snapshot_id: Optional[int] = Field(default=None, alias="snapshot-id") class AssertLastAssignedFieldId(TableRequirement):