anuragmantri commented on code in PR #7770:
URL: https://github.com/apache/iceberg/pull/7770#discussion_r1634724398


##########
core/src/main/java/org/apache/iceberg/SnapshotParser.java:
##########
@@ -93,6 +102,21 @@ static void toJson(Snapshot snapshot, JsonGenerator 
generator) throws IOExceptio
       generator.writeNumberField(SCHEMA_ID, snapshot.schemaId());
     }
 
+    if (snapshot.manifestListFile().wrappedKeyMetadata() != null) {
+      generator.writeStringField(
+          MANIFEST_LIST_KEY_METADATA, 
snapshot.manifestListFile().wrappedKeyMetadata());
+      ByteBuffer decodedManifestListKeyMetadata =
+          ByteBuffer.wrap(
+              
Base64.getDecoder().decode(snapshot.manifestListFile().wrappedKeyMetadata()));
+
+      NativeEncryptionKeyMetadata wrappedKeyMetadata =

Review Comment:
   Is this unused? 



##########
api/src/main/java/org/apache/iceberg/Snapshot.java:
##########
@@ -162,6 +162,16 @@ default Iterable<DeleteFile> removedDeleteFiles(FileIO io) 
{
    */
   String manifestListLocation();

Review Comment:
   Is `String manifestListLocation()` same as what is stored in 
ManifestListFile? If so, do we still need it as a separate field? 



##########
core/src/main/java/org/apache/iceberg/SnapshotParser.java:
##########
@@ -147,6 +175,42 @@ static Snapshot fromJson(JsonNode node) {
     if (node.has(MANIFEST_LIST)) {
       // the manifest list is stored in a manifest list file
       String manifestList = JsonUtil.getString(MANIFEST_LIST, node);
+
+      ByteBuffer manifestListKeyMetadata = null;
+      ByteBuffer wrappedManifestListKeyMetadata = null;
+      String wrappedKeyEncryptionKey = null;

Review Comment:
   Nit: Declare these inside `if (node.has(MANIFEST_LIST_KEY_METADATA))` ? 



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to