jerryshao commented on code in PR #6751:
URL: https://github.com/apache/gravitino/pull/6751#discussion_r2021473564


##########
core/src/main/java/org/apache/gravitino/connector/PropertiesMetadata.java:
##########
@@ -102,10 +146,73 @@ default Object getOrDefault(Map<String, String> 
properties, String propertyName)
    * @return the default value object of the property.
    */
   default Object getDefaultValue(String propertyName) {
+    PropertyEntry<?> propertyEntry = getPropertyEntry(propertyName);
+
+    return propertyEntry.getDefaultValue();
+  }
+
+  /**
+   * Get the property entry of the property. The non-prefix property entry 
will be returned if
+   * exists, otherwise the longest prefix property entry will be returned.
+   *
+   * <p>For example, if there are two property prefix entries "foo." and 
"foo.bar", and the property
+   * name is "foo.bar.baz", the entry for "foo.bar" will be returned. If the 
property entry
+   * "foo.bar.baz" is defined, it will be returned instead.

Review Comment:
   Is it a valid scenario? Do we need to allow such scenario or ban this?



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