@Override
  public boolean filterPartitionsByExpr(List<FieldSchema> partColumns,
      byte[] exprBytes, String defaultPartitionName, List<String> partitionNames) throws MetaException {
    List<String> partColumnNames = new ArrayList<>();
    List<PrimitiveTypeInfo> partColumnTypeInfos = new ArrayList<>();
    for (FieldSchema fs : partColumns) {
      partColumnNames.add(fs.getName());
      partColumnTypeInfos.add(TypeInfoFactory.getPrimitiveTypeInfo(fs.getType()));
    }
    ExprNodeDesc expr = deserializeExpr(exprBytes);
    try {
      ExprNodeDescUtils.replaceEqualDefaultPartition(expr, defaultPartitionName);
    } catch (SemanticException ex) {
      LOG.error("Failed to replace default partition", ex);
      throw new MetaException(ex.getMessage());
    }
    try {
      long startTime = System.nanoTime(), len = partitionNames.size();
      boolean result = PartitionPruner.prunePartitionNames(
          partColumnNames, partColumnTypeInfos, expr, defaultPartitionName, partitionNames);
      double timeMs = (System.nanoTime() - startTime) / 1000000.0;
      LOG.debug("Pruning " + len + " partition names took " + timeMs + "ms");
      return result;
    } catch (HiveException ex) {
      LOG.error("Failed to apply the expression", ex);
      throw new MetaException(ex.getMessage());
    }
  }
The basic implementation of PartitionExpressionProxy that uses ql package classes.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionExpressionForMetastore.java