rdblue commented on code in PR #6762:
URL: https://github.com/apache/iceberg/pull/6762#discussion_r1320873379


##########
data/src/main/java/org/apache/iceberg/data/BaseFileWriterFactory.java:
##########
@@ -261,6 +264,8 @@ public PositionDeleteWriter<T> newPositionDeleteWriter(
                   .withSpec(spec)
                   .withPartition(partition)
                   .withKeyMetadata(keyMetadata)
+                  .withFileEncryptionKey(keyMetadata.encryptionKey())

Review Comment:
   Same here. Why doesn't this use the raw output file?
   
   Also, should we have a `Parquet.writeDeletes(EncryptingOutputFile)`? It 
would work like this:
   ```java
     public static DeleteWriteBuilder writeDeletes(EncryptedOutputFile file) {
       if (file.keyMetadata() instanceof KeyMetadata) {
         KeyMetadata standardKeyMetadata = (KeyMetadata) file.keyMetadata();
         return writeDeletes(file.rawOutputFile())
             .keyMetadata(standardKeyMetadata.encryptionKey())
             .withAADPrefix(standardKeyMetadata.aadPrefix());
       } else {
         return writeDeletes(file.encryptingOutputFile());
       }
     }
   ```



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