rdblue commented on code in PR #6762:
URL: https://github.com/apache/iceberg/pull/6762#discussion_r1421849186
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -125,6 +127,16 @@ public static WriteBuilder write(OutputFile file) {
return new WriteBuilder(file);
}
+ public static WriteBuilder write(EncryptedOutputFile file) {
+ if (EncryptionUtil.useNativeEncryption(file.keyMetadata())) {
+ return write(file.rawOutputFile())
+ .withFileEncryptionKey(file.keyMetadata().encryptionKey())
Review Comment:
I think this also needs to call `withKeyMetadata` so that the key metadata
instance is set.
After that, it's awkward that the key metadata is set separately than the
encryption key and AAD prefix in this case because the key metadata is not
opaque. I think the solution is to do the `instanceof` check above in
`withKeyMetadata`. That way if the key metadata is `StandardKeyMetadata` then
it will also configure the AAD prefix and key. If not, then setting them
separately makes sense.
--
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]