@Override
    public RelNode createJoin(RelNode left, RelNode right, List<RelHint> hints, RexNode condition,
      Set<CorrelationId> variablesStopped, JoinRelType joinType, boolean semiJoinDone) {
      if (joinType == JoinRelType.SEMI) {
        final RelOptCluster cluster = left.getCluster();
        return HiveSemiJoin.getSemiJoin(cluster, left.getTraitSet(), left, right, condition);
      }
      if (joinType == JoinRelType.ANTI) {
        final RelOptCluster cluster = left.getCluster();
        return HiveAntiJoin.getAntiJoin(cluster, left.getTraitSet(), left, right, condition);
      }
      return HiveJoin.getJoin(left.getCluster(), left, right, condition, joinType);
    }
Creates a join.

@param left
         Left input
@param right
         Right input
@param condition
         Join condition
@param variablesStopped
         Set of names of variables which are set by the LHS and used by
         the RHS and are not available to nodes above this JoinRel in the
         tree
@param joinType
            Join type
@param semiJoinDone
         Whether this join has been translated to a semi-join
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelFactories.java