You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Fokko (via GitHub)" <gi...@apache.org> on 2023/07/19 10:50:23 UTC

[GitHub] [iceberg] Fokko commented on a diff in pull request #8082: Python: Improve Avro Parse speed

Fokko commented on code in PR #8082:
URL: https://github.com/apache/iceberg/pull/8082#discussion_r1267903671


##########
python/pyiceberg/typedef.py:
##########
@@ -127,18 +127,23 @@ def json(self, exclude_none: bool = True, exclude: Optional[Set[str]] = None, by
         )
 
 
+CACHED_STRUCT_TO_FIELD_NAME_POSITIONS: Dict[StructType, List[str]] = {}

Review Comment:
   ```suggestion
   @lru_cache
   def _get_struct_fields(struct_type: StructType) -> List[str]:
       return [field.name for field in struct_type.fields]
   ```



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org