tengqm commented on code in PR #6367:
URL: https://github.com/apache/gravitino/pull/6367#discussion_r1929675426


##########
core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java:
##########
@@ -445,7 +447,7 @@ public static List<String> getMetadataObjectLocation(
                         // The Hive default schema location is Hive warehouse 
directory
                         String defaultSchemaLocation =
                             getHiveDefaultLocation(ident.name(), 
catalogObj.name());
-                        if (defaultSchemaLocation != null && 
!defaultSchemaLocation.isEmpty()) {
+                        if (StringUtils.isNotBlank(defaultSchemaLocation)) {

Review Comment:
   💯 



##########
core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java:
##########
@@ -462,6 +464,13 @@ public static List<String> getMetadataObjectLocation(
               if (defaultSchemaLocation != null && 
!defaultSchemaLocation.isEmpty()) {

Review Comment:
   Change this as well?



##########
core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java:
##########
@@ -472,19 +481,20 @@ public static List<String> getMetadataObjectLocation(
                     .catalogDispatcher()
                     .loadCatalog(
                         NameIdentifier.of(ident.namespace().level(0), 
ident.namespace().level(1)));
-            LOG.info("Catalog provider is %s", catalogObj.provider());
-            if (catalogObj.provider().equals("hive")) {
+            LOG.info("Catalog provider is {}", catalogObj.provider());
+            String catalogProvider = catalogObj.provider();
+            if (Objects.equals(catalogProvider, "hive")
+                || Objects.equals(catalogProvider, "hadoop")) {

Review Comment:
   Why don't we just do string comparison?



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