private static List<PrimitiveTypeInfo> extractPartColTypes(Table tab) {
    List<FieldSchema> pCols = tab.getPartCols();
    List<PrimitiveTypeInfo> partColTypeInfos = new ArrayList<>(pCols.size());
    for (FieldSchema pCol : pCols) {
      partColTypeInfos.add(TypeInfoFactory.getPrimitiveTypeInfo(pCol.getType()));
    }
    return partColTypeInfos;
  }
Pruning partition by getting the partition names first and pruning using Hive expression
evaluator on client.
@param tab the table containing the partitions.
@param partitions the resulting partitions.
@param prunerExpr the SQL predicate that involves partition columns.
@param conf Hive Configuration object, can not be NULL.
@return true iff the partition pruning expression contains non-partition columns.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionPruner.java