private PartitionWithoutSD buildPartitionWithoutSD(List<String> values, int index)
      throws MetaException {
    PartitionWithoutSD partition = new PartitionWithoutSD();
    partition.setCreateTime(DEFAULT_CREATE_TIME);
    partition.setLastAccessTime(DEFAULT_CREATE_TIME);
    partition.setValues(values);
    Map<String, String> parameters = new HashMap<>();
    parameters.put(DEFAULT_PARAM_KEY + index, DEFAULT_PARAM_VALUE + index);
    partition.setParameters(parameters);
    partition.setRelativePath("partwithoutsd" + index);
    return partition;
  }
Tests for creating partitions from partition spec.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitionsFromPartSpec.java