kevinjqliu commented on code in PR #4328:
URL: https://github.com/apache/iceberg-python/pull/4328#discussion_r4567990149


##########
pyiceberg/io/pyarrow.py:
##########
@@ -1176,7 +1176,10 @@ def _parquet_decryption_properties(key_metadata: bytes) 
-> pq.FileDecryptionProp
     return create_decryption_properties(metadata.encryption_key, 
aad_prefix=metadata.aad_prefix)
 
 
-def _parquet_encryption_properties(key_metadata: StandardKeyMetadata) -> 
pq.FileEncryptionProperties:
+def _parquet_encryption_properties(key_metadata: StandardKeyMetadata | None) 
-> pq.FileEncryptionProperties | None:
+    if key_metadata is None:
+        return None
+

Review Comment:
   this is a nit change, i prefer to keep the logic inside 
`_parquet_encryption_properties` itself and simplify 
`ParquetFormatWriter.__init__` 



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