@Override
  public List<String> listPartitionNames(PartitionsByExprRequest req) throws TException {
    String dbName = req.getDbName(), tblName = req.getTblName();
    org.apache.hadoop.hive.metastore.api.Table table = getTempTable(dbName, tblName);
    if (table == null) {
      return super.listPartitionNames(req);
    }
    List<Partition> partitionList = getPartitionedTempTable(table).listPartitions();
    if (partitionList.isEmpty()) {
      return Collections.emptyList();
    }

    byte[] expr = req.getExpr();
    boolean isEmptyFilter = (expr == null || (expr.length == 1 && expr[0] == -1));
    if (!isEmptyFilter) {
      partitionList = getPartitionedTempTable(table).listPartitionsByFilter(
          generateJDOFilter(table, expr, req.getDefaultPartitionName()));
    }

    List<String> results = new ArrayList<>();
    Collections.sort(partitionList, new PartitionNamesComparator(table, req));
    short maxParts = req.getMaxParts();
    for(int i = 0; i < ((maxParts < 0 || maxParts > partitionList.size()) ? partitionList.size() : maxParts); i++) {
      results.add(Warehouse.makePartName(table.getPartitionKeys(), partitionList.get(i).getValues()));
    }
    return results;
  }
@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