u70b3 commented on code in PR #67978:
URL: https://github.com/apache/doris/pull/67978#discussion_r4214156641


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/lance/LanceExternalCatalog.java:
##########
@@ -100,10 +107,41 @@ public String resolveCurrentIndexJobLocator(String 
dbName, String tableName) {
         try {
             return withClient(current -> 
current.resolveCurrentIndexJobLocator(dbName, tableName));
         } catch (Exception e) {
+            LOG.warn("failed to resolve the current dataset locator of {}.{} 
in lance catalog {}",
+                    dbName, tableName, getName(), e);
             return null;
         }
     }
 
+    /**
+     * Three-valued resolution of the dataset the given names point at, for 
callers
+     * that take a durable action on the verdict and must not fold "verified 
gone"
+     * and "could not tell" together. {@link #resolveCurrentIndexJobLocator} 
returns
+     * null for both on purpose (SHOW's fail-closed rule folds them); this form
+     * distinguishes them: a {@code TableNotFound}/{@code NamespaceNotFound} 
answer
+     * from the namespace is positive evidence of absence, while any other 
failure is
+     * logged (the sanitized client chain already masks locators and 
credentials)
+     * and reported as {@link LanceIndexDatasetCheck.Outcome#UNRESOLVED}.
+     *
+     * <p>Callers must pass the REMOTE names of the relations when they hold 
the
+     * resolved objects (admission persists local names, and the namespace is
+     * case-sensitive); a caller with no resolved object falls back to its 
local
+     * names, which is correct whenever the local layer could not resolve them
+     * either — a case-mapped remote name resolves locally, so a local miss 
with a
+     * reachable namespace means no case-insensitive match exists at all.
+     */
+    public LanceIndexDatasetCheck checkIndexJobDataset(String dbName, String 
tableName) {
+        try {
+            String locator = withClient(current -> 
current.resolveCurrentIndexJobLocator(dbName, tableName));
+            return LanceIndexDatasetCheck.present(locator);
+        } catch (TableNotFoundException | NamespaceNotFoundException e) {

Review Comment:
   done: multiple case-insensitive matches are now refused as UNRESOLVED 
(findUniqueIgnoreCase), so a case-colliding namespace can neither prove absence 
nor bind the wrong spelling (797ddd6)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to