@Override
  public void dropTable(Table tbl, boolean deleteData, boolean ignoreUnknownTbl, boolean ifPurge) throws TException {
    EnvironmentContext context = null;
    if (ifPurge) {
      context = getEnvironmentContextWithIfPurgeSet();
    }
    if (tbl.isSetTxnId()) {
      context = Optional.ofNullable(context).orElse(new EnvironmentContext());
      context.putToProperties(hive_metastoreConstants.TXN_ID, String.valueOf(tbl.getTxnId()));
    }
    String catName = Optional.ofNullable(tbl.getCatName()).orElse(getDefaultCatalog(conf));

    dropTable(catName, tbl.getDbName(), tbl.getTableName(), deleteData,
        ignoreUnknownTbl, context);
  }
Handles dropDatabase by invoking drop_database in HMS.
Useful when table list in DB can fit in memory, it will retrieve all tables at once and
call drop_database once. Also handles drop_table hooks.
@param req
@param tableList
@throws TException
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java