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 07:51:42 UTC

[GitHub] [iceberg] jun-he opened a new pull request #2007: Fix update partition spec with only rename changes

jun-he opened a new pull request #2007:
URL: https://github.com/apache/iceberg/pull/2007


    Fix update partition spec with only rename changes by treating the new spec as incompatible one.
   


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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [iceberg] rdblue merged pull request #2007: Fix update partition spec with only rename changes

Posted by GitBox <gi...@apache.org>.
rdblue merged pull request #2007:
URL: https://github.com/apache/iceberg/pull/2007


   


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


[GitHub] [iceberg] jun-he commented on pull request #2007: Fix update partition spec with only rename changes

Posted by GitBox <gi...@apache.org>.
jun-he commented on pull request #2007:
URL: https://github.com/apache/iceberg/pull/2007#issuecomment-752679918


   @rdblue @aokolnychyi can you take a look? Thanks.


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


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

Posted by GitBox <gi...@apache.org>.
jun-he commented on a change in pull request #2007:
URL: https://github.com/apache/iceberg/pull/2007#discussion_r550424590



##########
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:
       Updated. Thanks.
   




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


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

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #2007:
URL: https://github.com/apache/iceberg/pull/2007#issuecomment-753079469


   Thanks, @jun-he! I merged this.


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