@Test
  public void testCompareWithSdSamePrefixDifferentOutputFormat() throws MetaException {
    Partition p1 = new PartitionBuilder()
        .setDbName("DB_NAME")
        .setTableName(TABLE_NAME)
        .setLocation("l1")
        .addCol("a", "int")
        .addValue("val1")
        .setOutputFormat("foo")
        .build(null);
    Partition p2 = new PartitionBuilder()
        .setDbName("DB_NAME")
        .setTableName(TABLE_NAME)
        .setLocation("l2")
        .addCol("a", "int")
        .setOutputFormat("bar")
        .addValue("val1")
        .build(null);
    Partition p3 = new PartitionBuilder()
        .setDbName("DB_NAME")
        .setTableName(TABLE_NAME)
        .setLocation("l2")
        .addCol("a", "int")
        .setOutputFormat("foo")
        .addValue("val1")
        .build(null);
    assertThat(new MetaStoreServerUtils.StorageDescriptorKey("a", p1.getSd()),
        IsNot.not(new MetaStoreServerUtils.StorageDescriptorKey("a", p2.getSd())));
    assertThat(new MetaStoreServerUtils.StorageDescriptorKey("a", p1.getSd()),
        is(new MetaStoreServerUtils.StorageDescriptorKey("a", p3.getSd())));
  }
Two StorageDescriptorKey objects with the same base location
should be equal iff their output formats are equal
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java