Skip to content

Commit

Permalink
Fix the nullability of snapshot-id on AssertRefSnapshotId (#103)
Browse files Browse the repository at this point in the history
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  apache/iceberg#7710 in
  • Loading branch information
Fokko authored Oct 25, 2023
1 parent 66be1eb commit 6184bca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyiceberg/table/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6184bca

Please sign in to comment.