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


##########
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:
   we already have the scenario, see the [chained authorization plugin 
properties](https://gravitino.apache.org/docs/0.8.0-incubating/security/authorization-push-down#chain-authorization-plugin):
   
   property `authorization.chain.plugins` and property prefix 
`authorization.chain.` have the same prefix



-- 
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: commits-unsubscr...@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to