nastra commented on code in PR #16881:
URL: https://github.com/apache/iceberg/pull/16881#discussion_r3457743570
##########
core/src/main/java/org/apache/iceberg/deletes/DeleteGranularity.java:
##########
@@ -48,14 +48,10 @@ public enum DeleteGranularity {
@Override
public String toString() {
- switch (this) {
- case FILE:
- return "file";
- case PARTITION:
- return "partition";
- default:
- throw new IllegalArgumentException("Unknown delete granularity: " +
this);
- }
+ return switch (this) {
+ case FILE -> "file";
+ case PARTITION -> "partition";
Review Comment:
generally speaking, I think we should keep the default branch everywhere,
because we don't know what string values a client might pass, so it's not
always safe to remove the default branch. Can you please make sure to restore
all default branches across the entire PR?
--
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]