weibangpeng opened a new pull request, #8326: URL: https://github.com/apache/paimon/pull/8326
## Summary Fix #4853: When using Hive catalog, DROP TABLE fails if the table directory has been deleted from the filesystem, leaving orphaned HMS metadata. HiveCatalog's `dropTable` inherited `AbstractCatalog.dropTable()` which calls `getTable()` first as an existence check. `getTable()` → `loadTableSchema()` → `tableSchemaInFileSystem()` requires reading schema from the filesystem, so when the directory was deleted, it threw `TableNotExistException` before `dropTableImpl()` could clean up the HMS record. ## Fix Override `dropTable()` in HiveCatalog to: 1. Check HMS directly via `getHmsTable()` for existence 2. Tolerate missing filesystem when collecting external paths 3. Always proceed to `dropTableImpl()` which drops the HMS metadata Also make `AbstractCatalog.getSchemaExternalPaths` protected so subclasses can reuse it. ## Test Added `testDropTableWhenFilesystemDeleted` in `HiveCatalogTest` — creates table, deletes filesystem directory, verifies `dropTable` succeeds and the table is fully cleaned up. -- 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]
