jackye1995 commented on a change in pull request #3387:
URL: https://github.com/apache/iceberg/pull/3387#discussion_r752644005



##########
File path: core/src/main/java/org/apache/iceberg/util/PropertyUtil.java
##########
@@ -70,4 +70,45 @@ public static String propertyAsString(Map<String, String> 
properties,
     }
     return defaultValue;
   }
+
+  @FunctionalInterface
+  private interface PropertyResolver<A, B, C, R> {
+    R apply(A argA, B argB, C argC);
+  }
+
+  private static <T> T resolveProperty(PropertyResolver<Map<String, String>, 
String, T, T> resolver,
+                                    Map<String, String> options, String 
optionKey,
+                                    Map<String, String> properties, String 
propertyKey, T defaultVal) {
+    return resolver.apply(options, optionKey, resolver.apply(properties, 
propertyKey, defaultVal));
+  }
+
+  private static <T> T resolveProperty(PropertyResolver<Map<String, String>, 
String, T, T> resolver,
+                                      Map<String, String> options, String 
optionKey,

Review comment:
       I think what Russell suggests for a `SparkActionsConf` sounds like a 
better way, let me update the PR in that way and see how that goes




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