private static Partition makePartitionObjectWithAbsoluteLocation(String dbName, String tblName,
      List<String> ptnVals, Table tbl, String absolutePartitionLocation) throws MetaException {
    Partition part = new Partition();
    part.setDbName(dbName);
    part.setTableName(tblName);
    part.setValues(ptnVals);
    part.setParameters(new HashMap<>());
    part.setSd(tbl.getSd().deepCopy());
    part.getSd().setSerdeInfo(tbl.getSd().getSerdeInfo().deepCopy());
    part.getSd().setLocation(absolutePartitionLocation);
    MetaStoreServerUtils.updatePartitionStatsFast(part, tbl, warehouse, false, false, null, true);
    return part;
  }
tests create table and partition and tries to drop the table without
droppping the partition
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java