amogh-jahagirdar commented on code in PR #10736:
URL: https://github.com/apache/iceberg/pull/10736#discussion_r1693722945


##########
api/src/main/java/org/apache/iceberg/UpdatePartitionSpec.java:
##########
@@ -122,4 +122,12 @@ public interface UpdatePartitionSpec extends 
PendingUpdate<PartitionSpec> {
    *     change conflicts with other additions, removals, or renames.
    */
   UpdatePartitionSpec renameField(String name, String newName);
+
+  /**
+   * Sets that the new partition spec will be NOT set as the default partition 
spec for the table,
+   * the default behavior is to do so.
+   *
+   * @return this for method chaining
+   */
+  UpdatePartitionSpec notDefault();

Review Comment:
   Could we call this `addNonDefaultSpec` or `addInactiveSpec` cc 
@RussellSpitzer @shanielh? 
   
   When I was going through the test code the API name felt a bit odd (the 
heuristic I try and aim for is does it sound right when speaking as a 
sentence). 
   
   ```
    table.updateSpec().addField("id").addNonDefaultSpec().commit();
   ```
   
   reads more clear to me since it's more clear what the action is ("adding"), 
and what non-default is referring to ("spec")
   
   inactive maybe a bit more extreme but technically it is not the active table 
spec if it's added, since every write to the table should just ignore that spec 
until it is made active.
   



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to