@Override
    protected void generatePredicate(NodeProcessorCtx procCtx, FilterOperator fop,
                                     TableScanOperator top) throws SemanticException, UDFArgumentException {
      LBOpPartitionWalkerCtx owc = (LBOpPartitionWalkerCtx) procCtx;
      Table tbl = top.getConf().getTableMetadata();
      if (tbl.isPartitioned()) {
        // Run partition pruner to get partitions
        ParseContext parseCtx = owc.getParseContext();
        PrunedPartitionList prunedPartList;
        try {
          String alias = (String) parseCtx.getTopOps().keySet().toArray()[0];
          prunedPartList = PartitionPruner.prune(top, parseCtx, alias);
        } catch (HiveException e) {
          // Has to use full name to make sure it does not conflict with
          // org.apache.commons.lang3.StringUtils
          throw new SemanticException(e.getMessage(), e);
        }

        if (prunedPartList != null) {
          owc.setPartitions(prunedPartList);
        }
      }
    }
Retrieve partitions for the filter. This is called only when
the filter follows a table scan operator.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/listbucketingpruner/LBPartitionProcFactory.java