public List<Partition> getPartitionsWithSpecs(Table tbl, GetPartitionsRequest request)
      throws HiveException, TException {

    if (!tbl.isPartitioned()) {
      throw new HiveException(ErrorMsg.TABLE_NOT_PARTITIONED, tbl.getTableName());
    }
    int batchSize = MetastoreConf.getIntVar(conf, MetastoreConf.ConfVars.BATCH_RETRIEVE_MAX);
    if (batchSize > 0) {
      return new ArrayList<>(getAllPartitionsWithSpecsInBatches(tbl, batchSize, DEFAULT_BATCH_DECAYING_FACTOR, MetastoreConf.getIntVar(
          conf, MetastoreConf.ConfVars.GETPARTITIONS_BATCH_MAX_RETRIES), request));
    } else {
      return getPartitionsWithSpecsInternal(tbl, request);
    }
  }
Get a list of Partitions by filter.
@param tbl The table containing the partitions.
@param filter A string represent partition predicates.
@return a list of partitions satisfying the partition predicates.
@throws HiveException
@throws MetaException
@throws NoSuchObjectException
@throws TException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java