szlta commented on code in PR #14685:
URL: https://github.com/apache/iceberg/pull/14685#discussion_r2598505601
##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -574,8 +580,20 @@ private void encryptionPropsFromMetadata(Map<String,
String> tableProperties) {
}
}
- private void checkEncryptionProperties(String encryptionKeyIdFromHMS, String
dekLengthFromHMS) {
- Map<String, String> propertiesFromMetadata = current().properties();
+ private void checkIntegrityForEncryption(
+ String encryptionKeyIdFromHMS, String dekLengthFromHMS, String
metadataHashFromHMS) {
+ TableMetadata metadata = current();
+ if (StringUtils.isNotEmpty(metadataHashFromHMS)) {
+ HMSTablePropertyHelper.verifyMetadataHash(metadata, metadataHashFromHMS);
+ return;
+ }
+
+ LOG.warn(
+ "Full metadata integrity check skipped because no metadata hash was
recorded in HMS for table {}."
+ + "Falling back to encryption property based check.",
Review Comment:
Thanks for spotting it. Fixed.
--
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]