List<Partition> getPartitionsByNames(List<String> partNames) throws MetaException {
    if (partNames == null) {
      throw new MetaException("Partition names cannot be null");
    }
    List<org.apache.hadoop.hive.metastore.api.Partition> partitions = new ArrayList<>();
    for (String partName : partNames) {
      org.apache.hadoop.hive.metastore.api.Partition partition = getPartition(partName);
      if (partition != null) {
        partitions.add(partition);
      }
    }
    return partitions;
  }
This stores partition information for a temp table.
ql/src/java/org/apache/hadoop/hive/ql/metadata/TempTable.java