pvary commented on code in PR #14440:
URL: https://github.com/apache/iceberg/pull/14440#discussion_r2576758430


##########
core/src/main/java/org/apache/iceberg/util/PropertyUtil.java:
##########
@@ -127,6 +129,21 @@ public static String propertyAsString(
     return defaultValue;
   }
 
+  public static <E extends Enum<E>> E propertyAsEnum(

Review Comment:
   Any ideas how many places could we use this enum config?
   If there are many, we might be able to separate it to another PR, if only a 
few, we might not need it.



##########
core/src/main/java/org/apache/iceberg/util/PropertyUtil.java:
##########
@@ -127,6 +129,21 @@ public static String propertyAsString(
     return defaultValue;
   }
 
+  public static <E extends Enum<E>> E propertyAsEnum(
+      Map<String, String> properties, String property, Class<E> enumClass, E 
defaultValue) {
+    String value = properties.get(property);
+    if (value == null) {
+      return defaultValue;
+    }

Review Comment:
   nit: newline



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