jarredhj0214 commented on code in PR #15142:
URL: https://github.com/apache/gravitino/pull/15142#discussion_r4660927786
##########
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:
Fixed in ac122e68a. TABLE validation still uses the fast existence probe,
and COLUMN validation now loads the parent table to refresh stored column IDs.
A TABLE check earlier in the batch can no longer suppress the refresh, and each
parent is refreshed at most once per batch.
Regression tests cover external column additions and deletions,
single-column validation, both mixed-batch orders, and repeated columns. Could
you take another look?
--
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]