private static PrunedPartitionList getAllPartsFromCacheOrServer(Table tab, String key, boolean unknownPartitions,
    Map<String, PrunedPartitionList> partsCache)  throws SemanticException {
    PrunedPartitionList ppList = partsCache == null ? null : partsCache.get(key);
    if (ppList != null) {
      return ppList;
    }
    Set<Partition> parts;
    try {
      parts = getAllPartitions(tab);
    } catch (HiveException e) {
      throw new SemanticException(e);
    }
    ppList = new PrunedPartitionList(tab, key, parts, Collections.emptyList(), unknownPartitions);
    if (partsCache != null) {
      partsCache.put(key, ppList);
    }
    return ppList;
  }
Get the partition list for the table that satisfies the partition pruner
condition.

@param tab
         the table object for the alias
@param prunerExpr
         the pruner expression for the alias
@param conf
         for checking whether "strict" mode is on.
@param alias
         for generating error message only.
@param prunedPartitionsMap
         cached result for the table
@return the partition list for the table that satisfies the partition
        pruner condition.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionPruner.java