public List<Partition> getPartitions(Table tbl, Map<String, String> partialPartSpec)
      throws HiveException {
    if (tbl.hasNonNativePartitionSupport()) {
      return tbl.getStorageHandler().getPartitions(tbl, partialPartSpec);
    } else {
      return getPartitions(tbl, partialPartSpec, (short) -1); 
    }
  }
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.
@return list of partition objects
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java