List<Partition> listPartitionsWithAuthInfo(String userName, List<String> groupNames) {
    List<Partition> partitions = listPartitions();
    List<Partition> result = new ArrayList<>();
    partitions.forEach(p -> {
      if (checkPrivilegesForPartition(p, userName, groupNames)) {
        result.add(p);
      }
    });
    return result;
  }
This stores partition information for a temp table.
ql/src/java/org/apache/hadoop/hive/ql/metadata/TempTable.java