private void comparePartitionForSingleValuedFields(List<String> projectedFields,
      StorageDescriptor sharedSD, List<PartitionWithoutSD> partitionWithoutSDS, int partitionWithoutSDSIndex)
      throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
    for (Partition origPart : origPartitions) {
      for (String projectField : projectedFields) {
        // dbname, tableName and catName is not stored in partition
        if (projectField.equals("dbName") || projectField.equals("tableName") || projectField
            .equals("catName"))
          continue;
        if (projectField.startsWith("sd")) {
          String sdPropertyName = projectField.substring(projectField.indexOf("sd.") + 3);
          if (sdPropertyName.equals("location")) {
            // in case of location sharedSD has the base location and partition has relative location
            Assert.assertEquals("Location does not match", origPart.getSd().getLocation(),
                sharedSD.getLocation() + partitionWithoutSDS.get(partitionWithoutSDSIndex).getRelativePath());
          } else {
            Assert.assertEquals(PropertyUtils.getNestedProperty(origPart, projectField),
                PropertyUtils.getNestedProperty(sharedSD, sdPropertyName));
          }
        } else {
          Assert.assertEquals(PropertyUtils.getNestedProperty(origPart, projectField),
              PropertyUtils.getNestedProperty(partitionWithoutSDS.get(partitionWithoutSDSIndex), projectField));
        }
      }
      partitionWithoutSDSIndex++;
    }
  }
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