CodingCat commented on a change in pull request #3954:
URL: https://github.com/apache/iceberg/pull/3954#discussion_r790408147



##########
File path: core/src/main/java/org/apache/iceberg/BaseUpdatePartitionSpec.java
##########
@@ -124,6 +124,17 @@ public BaseUpdatePartitionSpec addField(Term term) {
     return addField(null, term);
   }
 
+  private BaseUpdatePartitionSpec rewriteDeleteAndAddField(
+      PartitionField existing, String name, Pair<Integer, Transform<?, ?>> 
sourceTransform) {
+    deletes.remove(existing.fieldId());
+    if (existing.name().equals(name)) {
+      return this;
+    } else {
+      String newName = name == null ? sourceTransform.second().toString() : 
name;
+      return renameField(existing.name(), newName);

Review comment:
       makes sense to me, changed accordingly




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

Reply via email to