Fokko commented on code in PR #6997:
URL: https://github.com/apache/iceberg/pull/6997#discussion_r1124334072
##########
python/pyiceberg/io/pyarrow.py:
##########
@@ -492,11 +710,7 @@ def _file_to_table(
schema_raw = None
if metadata := parquet_schema.metadata:
schema_raw = metadata.get(ICEBERG_SCHEMA)
- if schema_raw is None:
- raise ValueError(
- "Iceberg schema is not embedded into the Parquet file, see
https://github.com/apache/iceberg/issues/6505"
- )
- file_schema = Schema.parse_raw(schema_raw)
+ file_schema = Schema.parse_raw(schema_raw) if schema_raw is not None
else pyarrow_to_schema(parquet_schema)
Review Comment:
If the `field-id`'s are not set, I believe there is another fallback level
where we look at the names and try to look them up in the table schema. That
should be done in a separate PR, but maybe good to add a comment here.
--
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]