FANNG1 commented on code in PR #6746:
URL: https://github.com/apache/gravitino/pull/6746#discussion_r2020626251


##########
core/src/main/java/org/apache/gravitino/utils/NameIdentifierUtil.java:
##########
@@ -103,6 +103,28 @@ public static NameIdentifier ofTable(
   public static NameIdentifier ofTag(String metalake, String tagName) {
     return NameIdentifier.of(NamespaceUtil.ofTag(metalake), tagName);
   }
+
+  /**
+   * Create the user {@link NameIdentifier} with the given metalake and 
username.
+   *
+   * @param metalake The metalake name
+   * @param userName The username
+   * @return the created user {@link NameIdentifier}
+   */
+  public static NameIdentifier ofUser(String metalake, String userName) {
+    return NameIdentifier.of(NameIdentifierUtil.ofUser(metalake), userName);
+  }
+
+  /**
+   * Create a namespace for user.
+   *
+   * @param metalake The metalake name
+   * @return A namespace for user
+   */
+  public static Namespace ofUser(String metalake) {

Review Comment:
   seems more proper to place this method to `NamespaceUtil`?



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