@Override
  public Partition appendPartition(String catName, String dbName, String tableName, String partitionName)
      throws TException {
    org.apache.hadoop.hive.metastore.api.Table table = getTempTable(dbName, tableName);
    if (table == null) {
      return super.appendPartition(catName, dbName, tableName, partitionName);
    }
    if (partitionName == null || partitionName.isEmpty()) {
      throw new MetaException("The partition must be not null or empty.");
    }
    assertTempTablePartitioned(table);
    Map<String, String> specFromName = makeSpecFromName(partitionName);
    if (specFromName == null || specFromName.isEmpty()) {
      throw new InvalidObjectException("Invalid partition name " + partitionName);
    }
    List<String> pVals = new ArrayList<>();
    for (FieldSchema field : table.getPartitionKeys()) {
      String val = specFromName.get(field.getName());
      if (val == null) {
        throw new InvalidObjectException("Partition name " + partitionName + " and table partition keys " + Arrays
            .toString(table.getPartitionKeys().toArray()) + " does not match");
      }
      pVals.add(val);
    }
    Partition partition = new PartitionBuilder().inTable(table).setValues(pVals).build(conf);
    return appendPartitionToTempTable(table, partition);
  }
@param partialPvals partition values, can be partial.  This really means that missing values
                   are represented by empty str.
@param maxParts maximum number of partitions to fetch, or -1 for all
ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java