flyrain commented on a change in pull request #2638:
URL: https://github.com/apache/iceberg/pull/2638#discussion_r788083683



##########
File path: 
api/src/main/java/org/apache/iceberg/encryption/EncryptedOutputFile.java
##########
@@ -37,8 +39,15 @@
   OutputFile encryptingOutputFile();
 
   /**
-   * Metadata about the encryption key that is being used to encrypt the 
associated
+   * Metadata about the encryption keys and other crypto parameters used to 
encrypt the associated
    * {@link #encryptingOutputFile()}.
    */
   EncryptionKeyMetadata keyMetadata();
+
+  /**
+   * Parameters of native encryption (if used for this file)
+   */
+  default NativeFileCryptoParameters nativeEncryptionParameters() {

Review comment:
       Can we reuse `keyMetadata ` instead of introducing 
`nativeEncryptionParameters `? Here are reasons:
   1. Both `keyMetadata` and `nativeEncryptionParameters` are used for keys and 
crypto parameters.
   2. Each file will have either one, not both. It depends whether streaming 
encryption or native encryption is used for this file.
   
   NativeFileCryptoParameters can implement interface `EncryptionKeyMetadata` 
in that 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]

Reply via email to