smaheshwar-pltr opened a new pull request, #18799: URL: https://github.com/apache/iceberg/pull/18799
// Note: I'm including here the fixes in https://github.com/apache/iceberg/pull/18798 and https://github.com/apache/iceberg/pull/18489 that are unmerged to show how the final state might look Reviewers of https://github.com/apache/iceberg/pull/13066 and https://github.com/apache/iceberg/pull/13225 asked for the catalog-side encryption code to be shared. Hive, REST and Glue (https://github.com/apache/iceberg/pull/18220) each copy the same per-table state: the key ID, data key length, keys, encryption manager and FileIO. The copies have already diverged. This adds `TableEncryptionState`, owned by a catalog's table operations, and `EncryptionUtil.checkKeyIdUnchanged`. Each catalog still supplies the key ID from its own trusted source. Hive integrates them like this: ```java public FileIO io() { return tableEncryption.io(fileIO); } public EncryptionManager encryption() { return tableEncryption.encryption(); } // on refresh, for every table that exists in the catalog tableEncryption.update(keyIdFromCatalog, dataKeyLengthFromCatalog, current()); // on commit EncryptionUtil.checkKeyIdUnchanged(base, metadata); tableEncryption.adoptForNewTable(metadata); // in temp(uncommittedMetadata) tableEncryption.adoptForNewTable(uncommittedMetadata); ``` -- 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]
