tprelle commented on code in PR #6755: URL: https://github.com/apache/iceberg/pull/6755#discussion_r1098438966
########## spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/source/TestDataSourceOptions.java: ########## @@ -448,4 +448,37 @@ public void testExtraSnapshotMetadataWithSQL() throws InterruptedException, IOEx Assert.assertTrue(threadNames.contains(null)); Assert.assertTrue(threadNames.contains("test-extra-commit-message-writer-thread")); } + + @Test + public void testExtraSnapshotMetadataForSqlInPySpark() throws IOException { + String tableLocation = temp.newFolder("iceberg-table").toString(); + HadoopTables tables = new HadoopTables(CONF); + + Table table = + tables.create(SCHEMA, PartitionSpec.unpartitioned(), Maps.newHashMap(), tableLocation); + + List<SimpleRecord> expectedRecords = + Lists.newArrayList(new SimpleRecord(1, "a"), new SimpleRecord(2, "b")); + Dataset<Row> originalDf = spark.createDataFrame(expectedRecords, SimpleRecord.class); + originalDf.select("id", "data").write().format("iceberg").mode("append").save(tableLocation); + spark.read().format("iceberg").load(tableLocation).createOrReplaceTempView("target"); + spark.conf().set("spark.snapshot-property.extra-key", "someValue"); Review Comment: ok it's better to have everything similar :) thanks for the review -- 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