Fokko commented on code in PR #14163:
URL: https://github.com/apache/iceberg/pull/14163#discussion_r2372011978
##########
spark/v4.0/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestSnapshotTableProcedure.java:
##########
@@ -281,5 +298,61 @@ public void testSnapshotPartitionedWithParallelism()
throws IOException {
"Should have expected rows",
ImmutableList.of(row("a", 1L), row("b", 2L)),
sql("SELECT * FROM %s ORDER BY id", tableName));
+
+ Table createdTable = validationCatalog.loadTable(tableIdent);
+
+ for (ManifestFile manifest :
+ createdTable.currentSnapshot().dataManifests(new HadoopFileIO(new
Configuration()))) {
+ try (AvroIterable<GenericData.Record> reader =
+ Avro.read(org.apache.iceberg.Files.localInput(manifest.path()))
+ .project(SNAPSHOT_ID_READ_SCHEMA)
+ .createResolvingReader(GenericAvroReader::create)
+ .build()) {
+
+ assertThat(reader.getMetadata().get("format-version")).isEqualTo("2");
Review Comment:
Sweet syntax, thanks!
##########
spark/v4.0/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestSnapshotTableProcedure.java:
##########
@@ -281,5 +298,61 @@ public void testSnapshotPartitionedWithParallelism()
throws IOException {
"Should have expected rows",
ImmutableList.of(row("a", 1L), row("b", 2L)),
sql("SELECT * FROM %s ORDER BY id", tableName));
+
+ Table createdTable = validationCatalog.loadTable(tableIdent);
+
+ for (ManifestFile manifest :
+ createdTable.currentSnapshot().dataManifests(new HadoopFileIO(new
Configuration()))) {
Review Comment:
Good one!
--
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]