yihua commented on code in PR #7881:
URL: https://github.com/apache/hudi/pull/7881#discussion_r1167343155


##########
hudi-common/src/main/java/org/apache/hudi/common/config/ConfigProperty.java:
##########
@@ -139,6 +144,49 @@ public ConfigProperty<T> withDocumentation(String doc) {
     return new ConfigProperty<>(key, defaultValue, docOnDefaultValue, doc, 
sinceVersion, deprecatedVersion, inferFunction, validValues, advanced, 
alternatives);
   }
 
+  public <U extends Enum<U>> ConfigProperty<T> withDocumentation(Class<U> e) {
+    return withDocumentation(e,"");
+  }
+
+  private <U extends Enum<U>> boolean isDefaultField(Class<U> e, Field f) {
+    if (!hasDefaultValue()) {
+      return false;
+    }
+    if (defaultValue() instanceof String) {
+      return f.getName().equals(defaultValue());
+    }
+    return Enum.valueOf(e, f.getName()).equals(defaultValue());
+  }
+
+  public <U extends Enum<U>> ConfigProperty<T> withDocumentation(Class<U> e, 
String doc) {

Review Comment:
   I see.  You mean the same enum may be used by multiple configs with 
different meanings like the file format for base and log files?



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

Reply via email to