rdblue commented on a change in pull request #1101:
URL: https://github.com/apache/iceberg/pull/1101#discussion_r438372887



##########
File path: core/src/test/java/org/apache/iceberg/TestMergeAppend.java
##########
@@ -183,31 +183,97 @@ public void testManifestMergeMinCount() throws 
IOException {
 
     TableMetadata base = readMetadata();
     Assert.assertNull("Should not have a current snapshot", 
base.currentSnapshot());
+    V2Assert.assertEquals("Last sequence number should be 0", 0, 
readMetadata().lastSequenceNumber());
+    V1Assert.assertEquals("Table should end with last-sequence-number 0", 0, 
base.lastSequenceNumber());

Review comment:
       This doesn't make sense to me. The table metadata was just read into 
`base` above, so the `V2Assert` line doesn't need to read it again and can use 
`base.lastSequenceNumber()`. Next, if both v1 and v2 assertions are that 
`base.lastSequenceNumber()` is 0, then I think it makes more sense to use a 
normal `Assert.assertEquals` because it doesn't depend on the table version.

##########
File path: core/src/test/java/org/apache/iceberg/TestMergeAppend.java
##########
@@ -183,31 +183,97 @@ public void testManifestMergeMinCount() throws 
IOException {
 
     TableMetadata base = readMetadata();
     Assert.assertNull("Should not have a current snapshot", 
base.currentSnapshot());
+    V2Assert.assertEquals("Last sequence number should be 0", 0, 
readMetadata().lastSequenceNumber());
+    V1Assert.assertEquals("Table should end with last-sequence-number 0", 0, 
base.lastSequenceNumber());

Review comment:
       This doesn't make sense to me. The table metadata was just read into 
`base` above, so the `V2Assert` line doesn't need to read it again and can use 
`base.lastSequenceNumber()`. Next, if both v1 and v2 assertions are that 
`base.lastSequenceNumber()` is 0, then I think it makes more sense to use a 
normal `Assert.assertEquals` because it doesn't depend on the table version.
   
   I think these two lines should be replaced by this:
   
   ```java
       Assert.assertEquals("Should have last sequence number 0", 0, 
base.lastSequenceNumber());
   ```

##########
File path: core/src/test/java/org/apache/iceberg/TestMergeAppend.java
##########
@@ -183,31 +183,97 @@ public void testManifestMergeMinCount() throws 
IOException {
 
     TableMetadata base = readMetadata();
     Assert.assertNull("Should not have a current snapshot", 
base.currentSnapshot());
+    V2Assert.assertEquals("Last sequence number should be 0", 0, 
readMetadata().lastSequenceNumber());
+    V1Assert.assertEquals("Table should end with last-sequence-number 0", 0, 
base.lastSequenceNumber());

Review comment:
       This doesn't make sense to me. The table metadata was just read into 
`base` above, so the `V2Assert` line doesn't need to read it again and can use 
`base.lastSequenceNumber()`. Next, if both v1 and v2 assertions are that 
`base.lastSequenceNumber()` is 0, then I think it makes more sense to use a 
normal `Assert.assertEquals` because it doesn't depend on the table version.
   
   I think these two lines should be replaced by this:
   
   ```java
       Assert.assertEquals("Last sequence number should be 0", 0, 
base.lastSequenceNumber());
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to