rdblue commented on code in PR #7782:
URL: https://github.com/apache/iceberg/pull/7782#discussion_r1295072548


##########
python/pyiceberg/table/metadata.py:
##########
@@ -217,7 +232,15 @@ class TableMetadataV1(TableMetadataCommonFields, 
IcebergBaseModel):
     # because bumping the version should be an explicit operation that is up
     # to the owner of the table.
 
-    @root_validator
+    @model_validator(mode="before")
+    def cleanup_snapshot_id(cls, data: Dict[str, Any]) -> Dict[str, Any]:
+        return cleanup_snapshot_id(data)

Review Comment:
   Is this reused? Why have a separate method instead of inlining the logic 
here?



##########
python/pyiceberg/transforms.py:
##########
@@ -106,47 +100,37 @@ def _transform_literal(func: Callable[[L], L], lit: 
Literal[L]) -> Literal[L]:
     return literal(func(lit.value))
 
 
-class Transform(IcebergBaseModel, ABC, Generic[S, T]):
+def _deserialize_transform(v: Any) -> Any:

Review Comment:
   Minor: This could be public. It seems useful.



-- 
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]

Reply via email to