amogh-jahagirdar commented on code in PR #411:
URL: https://github.com/apache/iceberg-python/pull/411#discussion_r1485749975
##########
pyiceberg/table/metadata.py:
##########
@@ -313,6 +315,34 @@ def construct_partition_specs(cls, data: Dict[str, Any])
-> Dict[str, Any]:
return data
+ @model_validator(mode="before")
+ def construct_v1_spec_from_v2_fields(cls, data: Dict[str, Any]) ->
Dict[str, Any]:
Review Comment:
Actually @HonahX had a good catch here, it's not just a dump of partition
spec, the List[dict[str, any]] is a list of the fields themselves based on the
spec. I updated test_metadata. Also, The tests in
https://github.com/apache/iceberg-python/pull/245 exercise this path more so
going forward so we should have more coverage.
--
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]