Fokko commented on code in PR #7782:
URL: https://github.com/apache/iceberg/pull/7782#discussion_r1295088761
##########
python/pyiceberg/table/__init__.py:
##########
@@ -365,8 +365,8 @@ class AssertDefaultSortOrderId(TableRequirement):
class CommitTableRequest(IcebergBaseModel):
identifier: Identifier = Field()
- requirements: List[TableRequirement] = Field(default_factory=list)
- updates: List[TableUpdate] = Field(default_factory=list)
+ requirements: List[SerializeAsAny[TableRequirement]] =
Field(default_factory=list)
+ updates: List[SerializeAsAny[TableUpdate]] = Field(default_factory=list)
Review Comment:
I also had to learn this by raising an issue:
https://github.com/pydantic/pydantic/issues/6403#issuecomment-1620252270
It turns out that you need to wrap this when you're serializing an object,
that might have subclasses. This way it gets correctly serialized.
--
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]