public List<Partition> getPartitionsByNames(Table tbl, Map<String, String> partialPartSpec)
      throws HiveException {

    if (!tbl.isPartitioned()) {
      throw new HiveException(ErrorMsg.TABLE_NOT_PARTITIONED, tbl.getTableName());
    }
    List<String> names = getPartitionNames(tbl, partialPartSpec, (short) -1);

    return getPartitionsByNames(tbl, names);
  }
get all the partitions of the table that matches the given partial
specification. partition columns whose value is can be anything should be
an empty string.

@param tbl
         object for which partition is needed. Must be partitioned.
@param partialPartSpec
         partial partition specification (some subpartitions can be empty).
@return list of partition objects
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java