protected MapJoinOperator convertJoinToBucketMapJoin(
    JoinOperator joinOp,
    SortBucketJoinProcCtx joinContext) throws SemanticException {
    MapJoinOperator mapJoinOp = new MapJoinProcessor().convertMapJoin(
      pGraphContext.getConf(),
      joinOp,
      joinOp.getConf().isLeftInputJoin(),
      joinOp.getConf().getBaseSrc(),
      joinOp.getConf().getMapAliases(),
      joinContext.getBigTablePosition(),
      false,
      false);
    if (mapJoinOp == null) {
      return null;
    }
    // Remove the join operator from the query join context
    // Data structures coming from QBJoinTree
    mapJoinOp.getConf().setQBJoinTreeProps(joinOp.getConf());
    //
    pGraphContext.getMapJoinOps().add(mapJoinOp);
    pGraphContext.getJoinOps().remove(joinOp);
    convertMapJoinToBucketMapJoin(mapJoinOp, joinContext);
    return mapJoinOp;
  }
Whether this table is eligible for a sort-merge join.

@param pctx                  parse context
@param op                    map join operator being considered
@param joinTree              join tree being considered
@param alias                 table alias in the join tree being checked
@param pos                   position of the table
@param sortColumnsFirstTable The names and order of the sorted columns for the first table.
                             It is not initialized when pos = 0.
@return
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/optimizer/AbstractSMBJoinProc.java