RussellSpitzer commented on code in PR #8381:
URL: https://github.com/apache/iceberg/pull/8381#discussion_r1310591512
##########
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:
This is actually a valid check on both versions now, unless we want to be
sure to check for the void transform
https://github.com/apache/iceberg/blob/master/api/src/main/java/org/apache/iceberg/PartitionSpec.java#L89-L95
--
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]