amogh-jahagirdar commented on code in PR #10736:
URL: https://github.com/apache/iceberg/pull/10736#discussion_r1690448386
##########
api/src/main/java/org/apache/iceberg/UpdatePartitionSpec.java:
##########
@@ -122,4 +122,13 @@ public interface UpdatePartitionSpec extends
PendingUpdate<PartitionSpec> {
* change conflicts with other additions, removals, or renames.
*/
UpdatePartitionSpec renameField(String name, String newName);
+
+ /**
+ * Sets whether the new partition spec will be set as the default partition
spec for the table,
+ * the default behavior is to do so.
+ *
+ * @param value whether to set the new partition spec as default
+ * @return this for method chaining
+ */
+ UpdatePartitionSpec setAsDefault(Boolean value);
Review Comment:
I understand the intent and it's reasonable imo (don't think there's any
other API where adding this would make sense). Typically we try avoid adding
boolean APIs but to facilitate this case, it may be unavoidable. I'd like to
think through more alternatives though.
On another note, at minimum I think this should be made a primitive boolean
named `setAsDefaultSpec` (same with the API name imo)?
--
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]