public static void checkAndConvertBucketMapJoin(ParseContext pGraphContext,
      MapJoinOperator mapJoinOp, String baseBigAlias,
      List<String> joinAliases) throws SemanticException {
    BucketJoinProcCtx ctx = new BucketJoinProcCtx(pGraphContext.getConf());
    BucketMapjoinProc proc = new BucketMapjoinProc(pGraphContext);
    Map<Byte, List<ExprNodeDesc>> keysMap = mapJoinOp.getConf().getKeys();
    if (proc.checkConvertBucketMapJoin(ctx, mapJoinOp.getConf().getAliasToOpInfo(),
        keysMap, baseBigAlias, joinAliases)) {
      proc.convertMapJoinToBucketMapJoin(mapJoinOp, ctx);
    }
  }
Check if a mapjoin can be converted to a bucket mapjoin,
and do the version if possible.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/BucketMapjoinProc.java