huaxingao commented on code in PR #13066:
URL: https://github.com/apache/iceberg/pull/13066#discussion_r2403597344
##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -129,13 +192,39 @@ protected void doRefresh() {
}
refreshFromMetadataLocation(metadataLocation, metadataRefreshMaxRetries);
+
+ if (tableKeyIdFromHMS != null) {
+ tableKeyId = tableKeyIdFromHMS;
+ encryptionDekLength =
+ (dekLengthFromHMS != null)
+ ? Integer.parseInt(dekLengthFromHMS)
+ : TableProperties.ENCRYPTION_DEK_LENGTH_DEFAULT;
+
+ checkEncryptionProperties(tableKeyIdFromHMS, dekLengthFromHMS);
+ encryptedKeysFromMetadata = current().encryptionKeys();
+ }
}
@SuppressWarnings({"checkstyle:CyclomaticComplexity", "MethodLength"})
@Override
protected void doCommit(TableMetadata base, TableMetadata metadata) {
boolean newTable = base == null;
- String newMetadataLocation = writeNewMetadataIfRequired(newTable,
metadata);
+ encryptionPropsFromMetadata(metadata.properties());
+
+ String newMetadataLocation;
+ if (encryption() instanceof StandardEncryptionManager) {
Review Comment:
nit: `encryption()` is called again at L219. Shall we assign the result to a
local variable?
--
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]