kbendick commented on code in PR #4956:
URL: https://github.com/apache/iceberg/pull/4956#discussion_r889194071
##########
spark/v3.2/spark/src/test/java/org/apache/iceberg/spark/source/TestDataSourceOptions.java:
##########
@@ -404,4 +414,61 @@ public void testExtraSnapshotMetadata() throws IOException
{
Assert.assertTrue(table.currentSnapshot().summary().get("extra-key").equals("someValue"));
Assert.assertTrue(table.currentSnapshot().summary().get("another-key").equals("anotherValue"));
}
+
+ @Test
+ public void testExtraSnapshotMetadataWithSQL() throws IOException {
+ String tableLocation = temp.newFolder("iceberg-table").toString();
+ HadoopTables tables = new HadoopTables(CONF);
+ int threadsCount = 3;
+ ExecutorService executorService =
Executors.newFixedThreadPool(threadsCount, new ThreadFactory() {
Review Comment:
I would also prefer a test that uses a single write in the current thread
without any additional threading business. I worry that `CommitMetadata`
doesn't _seem_ thread local to users.
And then if a multi-threaded test is needed, using the helpers from
`ThreadPools` as suggested.
--
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]