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/12/30 19:05:03 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #2007: Fix update partition spec with only rename changes

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



##########
File path: core/src/test/java/org/apache/iceberg/TestTableUpdatePartitionSpec.java
##########
@@ -140,6 +140,19 @@ public void testRenameField() {
 
     Assert.assertEquals("should match evolved spec", evolvedSpec, table.spec());
     Assert.assertEquals(1002, table.spec().lastAssignedFieldId());
+
+    table.updateSpec()
+        .renameField("id_bucket_8", "id_partition")
+        .commit();
+
+    evolvedSpec = PartitionSpec.builderFor(table.schema())
+        .withSpecId(3)
+        .bucket("data", 16, "data_bucket")
+        .bucket("id", 8, "id_partition")
+        .truncate("id", 4, "id_trunc_4")
+        .build();
+    Assert.assertEquals("should match evolved spec", evolvedSpec, table.spec());
+    Assert.assertEquals(1002, table.spec().lastAssignedFieldId());

Review comment:
       This seems like it should be its own test case. Could you move it?




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