kevinjqliu commented on code in PR #4309:
URL: https://github.com/apache/iceberg-python/pull/4309#discussion_r4518168130
##########
pyiceberg/io/pyarrow.py:
##########
@@ -1146,9 +1147,10 @@ def _expression_to_complementary_pyarrow(expr:
BooleanExpression, schema: Schema
return expression_to_pyarrow(preserve_expr, schema)
-@lru_cache
-def _get_file_format(file_format: FileFormat, **kwargs: dict[str, Any]) ->
ds.FileFormat:
+def _create_arrow_read_format(file_format: FileFormat, key_metadata: bytes |
None, **kwargs: Any) -> ds.FileFormat:
if file_format == FileFormat.PARQUET:
+ if key_metadata is not None:
+ kwargs["decryption_properties"] =
_parquet_decryption_properties(key_metadata)
Review Comment:
`decryption_properties` documentation
https://arrow.apache.org/docs/python/generated/pyarrow.parquet.ParquetFile.html
##########
pyiceberg/io/pyarrow.py:
##########
@@ -1146,9 +1147,10 @@ def _expression_to_complementary_pyarrow(expr:
BooleanExpression, schema: Schema
return expression_to_pyarrow(preserve_expr, schema)
-@lru_cache
-def _get_file_format(file_format: FileFormat, **kwargs: dict[str, Any]) ->
ds.FileFormat:
+def _create_arrow_read_format(file_format: FileFormat, key_metadata: bytes |
None, **kwargs: Any) -> ds.FileFormat:
Review Comment:
we could consider making `key_metadata` required so future callers wont
forget to include it
--
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]