diqiu50 commented on code in PR #12098:
URL: https://github.com/apache/gravitino/pull/12098#discussion_r3612775324


##########
core/src/main/java/org/apache/gravitino/catalog/TableNormalizeDispatcher.java:
##########
@@ -52,8 +51,9 @@ public NameIdentifier[] listTables(Namespace namespace) 
throws NoSuchSchemaExcep
     // The constraints of the name spec may be more strict than underlying 
catalog,
     // and for compatibility reasons, we only apply case-sensitive 
capabilities here.
     Namespace caseSensitiveNs = normalizeCaseSensitive(namespace);
-    NameIdentifier[] identifiers = dispatcher.listTables(caseSensitiveNs);
-    return normalizeCaseSensitive(identifiers);
+    // The catalog guarantees listTables() already returns names in their 
canonical, legal
+    // form, so no re-normalization is needed here.
+    return dispatcher.listTables(caseSensitiveNs);

Review Comment:
   Not need test that case



##########
core/src/main/java/org/apache/gravitino/catalog/SchemaNormalizeDispatcher.java:
##########
@@ -57,10 +56,9 @@ public NameIdentifier[] listSchemas(Namespace namespace) 
throws NoSuchCatalogExc
               NameIdentifier.of(namespace.levels())));
     }
 
-    NameIdentifier[] identifiers = dispatcher.listSchemas(namespace);
-    // The constraints of the name spec may be more strict than underlying 
catalog,
-    // and for compatibility reasons, we only apply case-sensitive 
capabilities here.
-    return normalizeCaseSensitive(identifiers);
+    // The catalog guarantees listSchemas() already returns names in their 
canonical, legal
+    // form, so no re-normalization is needed here.
+    return dispatcher.listSchemas(namespace);
   }

Review Comment:
   same



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