aokolnychyi commented on code in PR #8381:
URL: https://github.com/apache/iceberg/pull/8381#discussion_r1310628454
##########
core/src/test/java/org/apache/iceberg/hadoop/TestHadoopCatalog.java:
##########
@@ -113,14 +125,21 @@ public void testReplaceTxnBuilder() throws Exception {
table = catalog.loadTable(tableIdent);
Assertions.assertThat(table.currentSnapshot()).isNull();
- PartitionSpec v1Expected =
- PartitionSpec.builderFor(table.schema())
- .alwaysNull("data", "data_bucket")
- .withSpecId(1)
- .build();
- Assertions.assertThat(table.spec())
- .as("Table should have a spec with one void field")
- .isEqualTo(v1Expected);
+
+ if (formatVersion == 1) {
+ PartitionSpec v1Expected =
+ PartitionSpec.builderFor(table.schema())
+ .alwaysNull("data", "data_bucket")
+ .withSpecId(1)
+ .build();
+ Assertions.assertThat(table.spec())
+ .as("Table should have a spec with one void field")
+ .isEqualTo(v1Expected);
+ } else {
+ Assertions.assertThat(table.spec().isUnpartitioned())
Review Comment:
I feel like it is better to highlight the difference in this case.
--
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]