geyanggang commented on code in PR #13481:
URL: https://github.com/apache/gravitino/pull/13481#discussion_r4090691774
##########
core/src/main/java/org/apache/gravitino/catalog/TableNormalizeDispatcher.java:
##########
@@ -62,7 +64,7 @@ public NameIdentifier[] listTables(Namespace namespace)
throws NoSuchSchemaExcep
public Table loadTable(NameIdentifier ident) throws NoSuchTableException {
// 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 dispatcher.loadTable(normalizeCaseSensitive(ident));
+ return
dispatcher.loadTable(resolvePhysicalName(normalizeCaseSensitive(ident)));
Review Comment:
The resolution now happens inside TableOperationDispatcher, and the SPI
receives the normalized identifier — which is the correct key here, because a
case-folding capability already encodes the caller's case intent in the
normalized name: an unquoted foo normalizes to the folded form (e.g. FOO), a
quoted "foo" normalizes to foo. The contract is exact-match-on-normalized-name
first (a verbatim name wins over a differently-cased sibling), then a unique
case-insensitive match, otherwise keep the normalized name — an ambiguous name
is never resolved to an arbitrary object. There's a test with both AMB_PROBE
and amb_probe present showing each resolves to itself and neither steals the
other.
--
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]