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


##########
core/src/main/java/org/apache/iceberg/BaseSnapshot.java:
##########
@@ -62,14 +70,56 @@ class BaseSnapshot implements Snapshot {
       Map<String, String> summary,
       Integer schemaId,
       String manifestList) {
+    this(
+        sequenceNumber,
+        snapshotId,
+        parentId,
+        timestampMillis,
+        operation,
+        summary,
+        schemaId,
+        manifestList,
+        0L,
+        null,
+        null,
+        null);
+  }
+
+  BaseSnapshot(
+      long sequenceNumber,
+      long snapshotId,
+      Long parentId,
+      long timestampMillis,
+      String operation,
+      Map<String, String> summary,
+      Integer schemaId,
+      String manifestListLocation,
+      long manifestListSize,
+      ByteBuffer manifestListKeyMetadata,
+      ByteBuffer wrappedManifestListKeyMetadata,
+      String wrappedKeyEncryptionKey) {
     this.sequenceNumber = sequenceNumber;
     this.snapshotId = snapshotId;
     this.parentId = parentId;
     this.timestampMillis = timestampMillis;
     this.operation = operation;
     this.summary = summary;
     this.schemaId = schemaId;
-    this.manifestListLocation = manifestList;
+    this.manifestListLocation = manifestListLocation;
+    this.manifestListSize = manifestListSize;
+    this.manifestListKeyMetadata = manifestListKeyMetadata;
+    if (wrappedManifestListKeyMetadata != null) {
+      Preconditions.checkArgument(
+          wrappedManifestListKeyMetadata.arrayOffset() == 0, "Offset must be 
0");

Review Comment:
   Looks like there are several places that call `ByteBuffer.array` directly. 
Can you replace all of them with `ByteBuffers.toByteArray`?



-- 
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