smaheshwar-pltr commented on code in PR #17404:
URL: https://github.com/apache/iceberg/pull/17404#discussion_r3670146394


##########
core/src/test/java/org/apache/iceberg/TestRowDelta.java:
##########
@@ -1990,6 +1991,21 @@ public void testDuplicateDVsAreMergedWithEncryption() 
throws IOException {
     assertDVHasDeletedPositions(encryptedTable, mergedDV, LongStream.range(0, 
4).boxed()::iterator);
   }
 
+  @TestTemplate
+  public void testStagedSnapshotKeysArePersistedWithEncryption() {
+    assumeThat(formatVersion).isGreaterThanOrEqualTo(3);
+
+    TestTables.TestTable encryptedTable = createEncryptedTable();
+    AppendFiles stagedAppend =
+        
encryptedTable.newAppend().appendFile(newDataFile("data_bucket=0")).stageOnly();
+    stagedAppend.commit();
+
+    Snapshot staged = Iterables.getOnlyElement(encryptedTable.snapshots());
+    // Reading the staged snapshot's manifest list decrypts it, proving its 
key was persisted into
+    // metadata even though the snapshot is not a branch head.

Review Comment:
   slop comment, improve it. 



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

Reply via email to