MCPcopy Create free account
hub / github.com/apache/impala / removeTable

Method removeTable

fe/src/main/java/org/apache/impala/catalog/Catalog.java:273–282  ·  view source on GitHub ↗

Removes a table from the catalog and returns the table that was removed, or null if the table/database does not exist.

(TTableName tableName)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

getDbMethod · 0.95
removeTableMethod · 0.95

Tested by

no test coverage detected