private static void adjust(HiveMetaStoreClient client, Partition part,
      String dbName, String tblName, boolean isThriftClient) throws TException {
    Partition part_get = client.getPartition(dbName, tblName, part.getValues());
    if (isThriftClient) {
      part.setCreateTime(part_get.getCreateTime());
      part.putToParameters(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.DDL_TIME, Long.toString(part_get.getCreateTime()));
    }
    part.setWriteId(part_get.getWriteId());
  }
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