private Partition createPartition(List<String> vals, Table table) throws MetaException {
    return new PartitionBuilder()
        .inTable(table)
        .setValues(vals)
        .addPartParam("key1", "S1")
        .addPartParam("key2", "S2")
        .addPartParam(EXCLUDE_KEY_PREFIX + "key1", "e1")
        .addPartParam(EXCLUDE_KEY_PREFIX + "key2", "e2")
        .setBucketCols(table.getSd().getBucketCols())
        .setSortCols(table.getSd().getSortCols())
        .setSerdeName(table.getSd().getSerdeInfo().getName())
        .setSerdeLib(table.getSd().getSerdeInfo().getSerializationLib())
        .setSerdeParams(table.getSd().getSerdeInfo().getParameters())
        .build(conf);
  }
Tests for getPartitionsWithSpecs metastore API. This test create some partitions and makes sure
that getPartitionsWithSpecs returns results which are comparable with the get_partitions API when
various combinations of projection spec are set. Also checks the JDO code path in addition to
directSQL code path
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestGetPartitionsUsingProjectionAndFilterSpecs.java