tom-s-powell opened a new pull request, #17592:
URL: https://github.com/apache/iceberg/pull/17592

   `EncryptingFileIO` methods are currently written to handle the case where 
key metadata may be null, e.g. 
https://github.com/tom-s-powell/iceberg/blob/main/api/src/main/java/org/apache/iceberg/encryption/EncryptingFileIO.java#L101-L107
   
   However, `bulkDecrypt` currently calls `wrap` on all `ContentFile`; for 
those without key metadata it'd create an `EncryptedInputFile` with 
`EncryptionKeyMetadata.empty()`. `StandardEncryptionManager#decrypt` is called 
which returns `StandardDecryptedInputFile`. Any attempt to parse the key 
metadata to `StandardKeyMetadata` will fail due to `Null key metadata buffer` 
(https://github.com/tom-s-powell/iceberg/blob/main/core/src/main/java/org/apache/iceberg/encryption/StandardKeyMetadata.java#L110-L112).
   
   This change makes `bulkDecrypt` resilient to `ContentFile` where key 
metadata is null. This preserves the previous behaviour where `em.decrypt` is 
called in bulk fashion (passing a list of files), hence the accumulation of  
`encryptedFiles` in the first pass through `files`.


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