@Test
  @Override
  public void testAddPartitionNullLocationInTableToo() throws Exception {
    createTable(DB_NAME, TABLE_NAME, null);
    Partition partition = buildPartition(DB_NAME, TABLE_NAME, DEFAULT_YEAR_VALUE, null);
    getClient().add_partition(partition);
    Partition part = getClient().getPartition(DB_NAME, TABLE_NAME, "year=2017");
    Assert.assertTrue(getMetaStore().isPathExists(new Path(part.getSd().getLocation())));
    assertEquals(SessionState.get().getTempTables().get(DB_NAME).get(TABLE_NAME).getSd().getLocation() + "/year=2017",
        part.getSd().getLocation());
  }
Test class for adding partitions related methods on temporary tables.
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSessionHiveMetastoreClientAddPartitionsTempTable.java