rdblue commented on code in PR #9131:
URL: https://github.com/apache/iceberg/pull/9131#discussion_r1402477101
##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSnapshotSelection.java:
##########
@@ -425,16 +426,35 @@ public void
testSnapshotSelectionByBranchWithSchemaChange() throws IOException {
// Deleting a column to indicate schema change
table.updateSchema().deleteColumn("data").commit();
- // The data should have the deleted column as it was captured in an
earlier snapshot.
- Dataset<Row> deletedColumnBranchSnapshotResult =
- spark.read().format("iceberg").option("branch",
"branch").load(tableLocation);
- List<SimpleRecord> deletedColumnBranchSnapshotRecords =
- deletedColumnBranchSnapshotResult
- .orderBy("id")
- .as(Encoders.bean(SimpleRecord.class))
- .collectAsList();
- Assert.assertEquals(
- "Current snapshot rows should match", expectedRecords,
deletedColumnBranchSnapshotRecords);
+ // The data should not have the deleted column
+ Assertions.assertThat(
+ spark
+ .read()
+ .format("iceberg")
+ .option("branch", "branch")
+ .load(tableLocation)
+ .orderBy("id")
+ .collectAsList())
+ .containsExactly(
+ new GenericRowWithSchema(new Object[] {1}, null),
+ new GenericRowWithSchema(new Object[] {2}, null),
+ new GenericRowWithSchema(new Object[] {3}, null));
Review Comment:
Can you use SimpleRecord like the rest of the tests do instead?
--
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]