diqiu50 opened a new issue, #12097:
URL: https://github.com/apache/gravitino/issues/12097

   ### What would you like to be improved?
   
   `CapabilityHelpers.applyCapabilities`/`applyCapabilitiesOnName` currently 
validates a name (`applyNameSpecification`) after it has already been 
normalized (`applyCaseSensitiveOn*`). This works for catalogs whose folding is 
context-independent (e.g. always upper/lower-case), but breaks down for 
catalogs whose folding depends on the name's original form (e.g. a quoted 
identifier keeps case/spaces, an unquoted one gets folded) — validation ends up 
checking the normalized form instead of what the caller actually supplied.
   
   Similarly, `SchemaNormalizeDispatcher#listSchemas` and 
`TableNormalizeDispatcher#listTables` re-apply `normalizeName` to identifiers 
the underlying catalog already returned in canonical form, which isn't 
guaranteed to be idempotent for such catalogs.
   
   ### How should we improve?
   
   Validate the original name before normalizing it in `CapabilityHelpers`. 
Drop the redundant re-normalization of catalog-returned identifiers in 
`listSchemas`/`listTables`, trusting the catalog to already return canonical 
names.


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