/** Create join - an argument of null is * simply dropped so Join.create(null, op) is op and Join.create(op,null) is op. */ public static Op create(Op left, Op right) { if ( left == null ) return right ; if ( right == null ) return left ; return new OpJoin(left, right) ; }
@Override public Op2 copy(Op newLeft, Op newRight) { return new OpJoin(newLeft, newRight) ; }
/** Create join, removing any joins with the identity table and any nulls. * <br>Join.create(null, op) is op. * <br>Join.create(op, null) is op. * <br>Join.create(TableUnit, op) is op. * <br>Join.create(op, TableUnit) is op. */ public static Op createReduce(Op left, Op right) { if ( left == null || isJoinIdentify(left) ) return right ; if ( right == null || isJoinIdentify(right) ) return left ; return new OpJoin(left, right) ; }