Removes a table from the catalog and returns the table that was removed, or null if the table/database does not exist.
(TTableName tableName)
| 271 | * if the table/database does not exist. |
| 272 | */ |
| 273 | public @Nullable Table removeTable(TTableName tableName) { |
| 274 | // Remove the old table name from the cache and add the new table. |
| 275 | Db db = getDb(tableName.getDb_name()); |
| 276 | if (db == null) return null; |
| 277 | Table tbl = db.removeTable(tableName.getTable_name()); |
| 278 | if (tbl != null && !tbl.isStoredInImpaladCatalogCache()) { |
| 279 | CatalogMonitor.INSTANCE.getCatalogTableMetrics().removeTable(tbl); |
| 280 | } |
| 281 | return tbl; |
| 282 | } |
| 283 | |
| 284 | /** |
| 285 | * Returns all tables and views in 'dbName' that match 'matcher'. |
nothing calls this directly
no test coverage detected