Fokko commented on code in PR #6654:
URL: https://github.com/apache/iceberg/pull/6654#discussion_r1085731519
##########
python/pyiceberg/io/pyarrow.py:
##########
@@ -505,7 +505,9 @@ def project_table(
# Get the schema
with fs.open_input_file(path) as fout:
parquet_schema = pq.read_schema(fout)
- schema_raw = parquet_schema.metadata.get(ICEBERG_SCHEMA)
+ schema_raw = None
+ if parquet_schema.metadata is not None:
Review Comment:
You could also leverage the Walrus operator here:
```suggestion
if metadata := parquet_schema.metadata:
```
--
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]