@Test
  public void testPartitionProjectionAllMultiValuedFields() throws Throwable {
    GetPartitionsRequest request = getGetPartitionsRequest();
    GetProjectionsSpec projectSpec = request.getProjectionSpec();
    List<String> projectedFields = Arrays
        .asList("values", "parameters", "sd.cols", "sd.bucketCols", "sd.sortCols", "sd.parameters",
            "sd.skewedInfo", "sd.serdeInfo.parameters");
    projectSpec.setFieldList(projectedFields);

    GetPartitionsResponse response = client.getPartitionsWithSpecs(request);

    Assert.assertEquals(1, response.getPartitionSpec().size());
    PartitionSpec partitionSpec = response.getPartitionSpec().get(0);
    PartitionSpecWithSharedSD partitionSpecWithSharedSD = partitionSpec.getSharedSDPartitionSpec();
    Assert.assertEquals(origPartitions.size(), partitionSpecWithSharedSD.getPartitions().size());
    StorageDescriptor sharedSD = partitionSpecWithSharedSD.getSd();
    for (int i = 0; i < origPartitions.size(); i++) {
      Partition origPartition = origPartitions.get(i);
      PartitionWithoutSD retPartition = partitionSpecWithSharedSD.getPartitions().get(i);
      for (String projectedField : projectedFields) {
        switch (projectedField) {
        case "values":
          validateList(origPartition.getValues(), retPartition.getValues());
          break;
        case "parameters":
          validateMap(origPartition.getParameters(), retPartition.getParameters());
          break;
        case "sd.cols":
          validateList(origPartition.getSd().getCols(), sharedSD.getCols());
          break;
        case "sd.bucketCols":
          validateList(origPartition.getSd().getBucketCols(), sharedSD.getBucketCols());
          break;
        case "sd.sortCols":
          validateList(origPartition.getSd().getSortCols(), sharedSD.getSortCols());
          break;
        case "sd.parameters":
          validateMap(origPartition.getSd().getParameters(), sharedSD.getParameters());
          break;
        case "sd.skewedInfo":
          if (!origPartition.getSd().getSkewedInfo().getSkewedColNames().isEmpty()) {
            validateList(origPartition.getSd().getSkewedInfo().getSkewedColNames(),
                sharedSD.getSkewedInfo().getSkewedColNames());
          }
          if (!origPartition.getSd().getSkewedInfo().getSkewedColValues().isEmpty()) {
            for (int i1 = 0;
                 i1 < origPartition.getSd().getSkewedInfo().getSkewedColValuesSize(); i1++) {
              validateList(origPartition.getSd().getSkewedInfo().getSkewedColValues().get(i1),
                  sharedSD.getSkewedInfo().getSkewedColValues().get(i1));
            }
          }
          if (!origPartition.getSd().getSkewedInfo().getSkewedColValueLocationMaps().isEmpty()) {
            validateMap(origPartition.getSd().getSkewedInfo().getSkewedColValueLocationMaps(),
                sharedSD.getSkewedInfo().getSkewedColValueLocationMaps());
          }
          break;
        case "sd.serdeInfo.parameters":
          validateMap(origPartition.getSd().getSerdeInfo().getParameters(),
              sharedSD.getSerdeInfo().getParameters());
          break;
        default:
          throw new IllegalArgumentException("Invalid field " + projectedField);
        }
      }
    }
  }
Confirms if the partitionWithoutSD object at partitionWithoutSDSIndex index has all the
projected fields set to values which are same as the ones set in origPartitions
@param projectedFields
@param sharedSD
@param partitionWithoutSDS
@param partitionWithoutSDSIndex
@throws IllegalAccessException
@throws InvocationTargetException
@throws NoSuchMethodException
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestGetPartitionsUsingProjectionAndFilterSpecs.java