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



##########
File path: api/src/main/java/org/apache/iceberg/UpdateSchema.java
##########
@@ -361,4 +361,14 @@ default UpdateSchema updateColumn(String name, 
Type.PrimitiveType newType, Strin
    *                                  change conflicts with other changes.
    */
   UpdateSchema moveAfter(String name, String afterName);
+
+
+  /**
+   * Applies all the additions and updates [type widening, field documentation]
+   * from the input schema
+   *
+   * @param newSchema - Input schema from which updates are applied
+   * @return this for method chaining
+   */
+  UpdateSchema upsertSchema(Schema newSchema);

Review comment:
       It seems odd to me that this is here. Does this support multiple calls 
to this method, or do we expect to mix this union operation with the others? If 
not, then I think we should consider how to separate the union logic from the 
API. We try to make sure that all of the configuration on table operations can 
be used at the same time, unless they logically conflict (like rename x -> y 
then delete y).
   
   If this is going to be incompatible or even just not recommended with the 
other configuration methods, then we should consider moving it to either its 
own operation or a class that helps configure the normal `UpdateSchema` 
operation.




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