jerryshao commented on code in PR #15142:
URL: https://github.com/apache/gravitino/pull/15142#discussion_r4638194271


##########
core/src/main/java/org/apache/gravitino/catalog/TableOperationDispatcher.java:
##########
@@ -150,7 +151,21 @@ public boolean tableExists(NameIdentifier ident) {
             getCatalogIdentifier(ident),
             wrapper -> wrapper.doWithCatalog(catalog -> catalog.ops() 
instanceof TableCatalog),
             RuntimeException.class);
-    return supportsTables && TableDispatcher.super.tableExists(ident);
+    if (!supportsTables) {
+      return false;
+    }
+    try {
+      Boolean exists =
+          TreeLockUtils.doWithTreeLock(ident, LockType.READ, () -> 
probeImportedTable(ident));
+      if (exists != null) {
+        return exists;

Review Comment:
   [P1] When an imported Hive table gains a column externally while retaining 
its identifier, this return skips the refresh needed by column tag operations. 
`MetadataObjectUtil.checkMetadataObject(COLUMN)` checks the parent through 
`tableExists`, then tag operations look up the column in the store, where it is 
still absent. Please retain the fast probe for table targets but load the 
parent for column targets. Update batch deduplication too, so an earlier table 
probe cannot suppress a required column refresh, and cover both a single column 
and a `[table, column]` batch after an external column addition.



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