hedger9487 opened a new pull request, #3844:
URL: https://github.com/apache/iceberg-python/pull/3844

   ### Description
   Fixes #3662.
   
   Every manifest file under a partition spec embeds an identical Avro schema 
string (`avro.schema`). Previously, `AvroFileHeader.get_schema()` in 
`pyiceberg/avro/file.py` performed a full `json.loads()` and recursive 
`AvroSchemaConversion().avro_to_iceberg()` conversion on every manifest read 
during scan planning.
   
   This PR adds an LRU cache for Avro schema string parsing via 
`_parse_avro_schema`, avoiding redundant conversions across repeated manifest 
reads during scan planning (e.g. accelerating `scan().plan_files()` by ~1.8x on 
tables with many manifests).
   
   ### Testing
   - Added unit test `test_get_schema_is_cached` in `tests/avro/test_file.py`.
   - All 49 Avro and manifest tests pass locally.


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