smaheshwar-pltr commented on code in PR #18489:
URL: https://github.com/apache/iceberg/pull/18489#discussion_r4644349599
##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/sql/TestTableEncryption.java:
##########
@@ -185,6 +185,29 @@ void transactionCanReadAfterTableRefresh() {
assertThat(currentDataFiles(table)).hasSize(dataFiles.size() + 1);
}
+ @TestTemplate
+ void transactionCanReadAfterMetadataCommits() {
+ validationCatalog.initialize(catalogName, catalogConfig);
+ Table table = validationCatalog.loadTable(tableIdent);
+ List<DataFile> dataFiles = currentDataFiles(table);
+ DataFile file = dataFiles.get(0);
+
+ Transaction transaction = table.newTransaction();
+ transaction.newFastAppend().appendFile(file).commit();
+
+ // Commit twice to check that the transaction's keys survive back-to-back
refreshes.
+ table.updateProperties().set("prop", "first").commit();
+ table.updateProperties().set("prop", "second").commit();
+
+
assertThat(SnapshotChanges.builderFor(transaction.table()).build().addedDataFiles())
+ .extracting(DataFile::location)
+ .containsExactly(file.location());
Review Comment:
(I've added a comment here now aligned with your point about more comments,
I agree there 👍)
--
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]