private static List<Partition> convertFromMetastore(Table tbl,
      List<org.apache.hadoop.hive.metastore.api.Partition> partitions) throws HiveException {
    if (partitions == null) {
      return Collections.emptyList();
    }

    List<Partition> results = new ArrayList<Partition>(partitions.size());
    for (org.apache.hadoop.hive.metastore.api.Partition tPart : partitions) {
      results.add(new Partition(tbl, tPart));
    }
    return results;
  }
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