You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/04/20 17:17:56 UTC

[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #936: Update TableTestBase tests to run with formats v1 and v2 (WIP)

rdblue commented on a change in pull request #936:
URL: https://github.com/apache/incubator-iceberg/pull/936#discussion_r411552221



##########
File path: core/src/test/java/org/apache/iceberg/TestManifestWriter.java
##########
@@ -24,22 +24,36 @@
 import org.apache.iceberg.ManifestEntry.Status;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
+@RunWith(Parameterized.class)
 public class TestManifestWriter extends TableTestBase {
+  @Parameterized.Parameters
+  public static Object[][] parameters() {
+    return new Object[][] {
+        new Object[] { 1 },
+        new Object[] { 2 },
+    };
+  }
+
+  public TestManifestWriter(int formatVersion) {
+    super(formatVersion);
+  }
 
   @Test
   public void testManifestStats() throws IOException {
     ManifestFile manifest = writeManifest(
         "manifest.avro",
-        manifestEntry(Status.ADDED, 100L, newFile(10)),
-        manifestEntry(Status.ADDED, 100L, newFile(20)),
-        manifestEntry(Status.ADDED, 100L, newFile(5)),
-        manifestEntry(Status.ADDED, 100L, newFile(5)),
-        manifestEntry(Status.EXISTING, 100L, newFile(15)),
-        manifestEntry(Status.EXISTING, 100L, newFile(10)),
-        manifestEntry(Status.EXISTING, 100L, newFile(1)),
-        manifestEntry(Status.DELETED, 100L, newFile(5)),
-        manifestEntry(Status.DELETED, 100L, newFile(2)));
+        manifestEntry(Status.ADDED, null, newFile(10)),
+        manifestEntry(Status.ADDED, null, newFile(20)),
+        manifestEntry(Status.ADDED, null, newFile(5)),
+        manifestEntry(Status.ADDED, null, newFile(5)),
+        manifestEntry(Status.EXISTING, null, newFile(15)),
+        manifestEntry(Status.EXISTING, null, newFile(10)),
+        manifestEntry(Status.EXISTING, null, newFile(1)),
+        manifestEntry(Status.DELETED, null, newFile(5)),
+        manifestEntry(Status.DELETED, null, newFile(2)));

Review comment:
       This needed to change because it isn't possible to write entries to a manifest that inherits a sequence number but not snapshot ID, unless the snapshot ID matches the commit.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org