Fokko commented on code in PR #5287:
URL: https://github.com/apache/iceberg/pull/5287#discussion_r927677754
##########
python/pyiceberg/table/metadata.py:
##########
@@ -347,10 +345,10 @@ class TableMetadata:
@staticmethod
def parse_obj(data: dict) -> Union[TableMetadataV1, TableMetadataV2]:
- if "format-version" not in data:
+ if "format-version" not in data and "format_version" not in data:
Review Comment:
This is before anything pydantic, but the data might come from actual
`json`, or from a `dict` that already has been parsed. In that case, the `-`
will be replaced by `_`, and pydantic will handle this correctly. That said, I
don't like it very much, and let me revert this.
--
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]