public void dropDatabase(DropDatabaseDesc desc) 
      throws HiveException, NoSuchObjectException {
    boolean isSoftDelete = HiveConf.getBoolVar(conf, ConfVars.HIVE_ACID_LOCKLESS_READS_ENABLED);
    
    long txnId = Optional.ofNullable(SessionState.get())
      .map(SessionState::getTxnMgr)
      .map(HiveTxnManager::getCurrentTxnId).orElse(0L);
    
    DropDatabaseRequest req = new DropDatabaseRequest();
    req.setCatalogName(getDefaultCatalog(conf));
    req.setName(desc.getDatabaseName());
    req.setIgnoreUnknownDb(desc.getIfExists());
    req.setDeleteData(desc.isDeleteData());
    req.setCascade(desc.isCasdade());
    req.setSoftDelete(isSoftDelete);
    req.setTxnId(txnId);
    
    try {
      getMSC().dropDatabase(req);
    } catch (NoSuchObjectException e) {
      throw e;
    } catch (Exception e) {
      throw new HiveException(e);
    }
  }
Drop a database
@param name
@param deleteData
@param ignoreUnknownDb if true, will ignore NoSuchObjectException
@param cascade         if true, delete all tables on the DB if exists. Otherwise, the query
                       will fail if table still exists.
@throws HiveException
@throws NoSuchObjectException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java