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


##########
catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueCatalogCapability.java:
##########
@@ -76,4 +76,12 @@ public CapabilityResult caseSensitiveOnName(Scope scope) {
         return CapabilityResult.SUPPORTED;
     }
   }
+
+  @Override
+  public String normalizeName(Scope scope, String name) {
+    if (name == null) {
+      return null;
+    }
+    return caseSensitiveOnName(scope).supported() ? name : 
name.toLowerCase(Locale.ROOT);
+  }

Review Comment:
   Tried this, but it breaks correctness: the default normalizeName logic 
relies on caseSensitiveOnName(scope) resolving polymorphically on this. 
Delegating to DEFAULT binds that call to DefaultCapability instead, so 
HiveCatalogCapability/GlueCatalogCapability (which override caseSensitiveOnName 
but not normalizeName) would silently lose their case-folding while still 
compiling fine. Kept the interface default self-contained (dispatch on this + 
null short-circuit) so any current/future implementation stays correct without 
needing a duplicate override.



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