private boolean canPredPushdown(ExprNodeDesc expr, List<ExprNodeDesc> groupByKeys,
        FastBitSet[] bitSets, int groupingSetPosition) {
      List<Integer> gbyKeyPos = new ArrayList<Integer>();
      getGBYKeyPosFromExpr(expr, groupByKeys, gbyKeyPos);
      // gbyKeysInExpr can be empty, maybe the expr is a boolean constant, let the expr push down
      for (Integer pos : gbyKeyPos) {
        for (FastBitSet bitset : bitSets) {
          int keyPos = bitset.nextClearBit(0);
          while (keyPos < groupingSetPosition && keyPos != pos) {
            keyPos = bitset.nextClearBit(keyPos + 1);
          }
          // If the gbyKey has not be found in grouping sets, the expr should not be pushed down
          if (keyPos != pos) {
            return false;
          }
        }
      }
      return true;
    }
Replaces exprNodeDescs in the specified exprNodeDesc using replaceMap by traversing the expression tree.
@param exprNodeDesc expression where exprNodeDescs should be replaced.
@param replaceMap Map containing replacements: key exprNodeDesc should be replaced to value exprNodeDesc.
@return The new expression with replaced exprNodeDescs.
ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java