### Question:
Join extends Operator { public void open() throws DbException, NoSuchElementException, TransactionAbortedException { super.open(); left.open(); right.open(); if(p.getOperator().equals(Predicate.Op.EQUALS)) { joinReuslt=HashJoin(); }else{ joinReuslt=NestedLoopJoin(); } joinReuslt.open(); } Join(JoinPredicate p, DbIterator child1, DbIterator child2); JoinPredicate getJoinPredicate(); String getJoinField1Name(); String getJoinField2Name(); TupleDesc getTupleDesc(); void open(); void close(); void rewind(); @Override DbIterator[] getChildren(); @Override void setChildren(DbIterator[] children);  }### Answer:
@Test public void gtJoin() throws Exception { JoinPredicate pred = new JoinPredicate(0, Predicate.Op.GREATER_THAN, 0); Join op = new Join(pred, scan1, scan2); op.open(); gtJoin.open(); TestUtil.matchAllTuples(gtJoin, op); }
@Test public void eqJoin() throws Exception { JoinPredicate pred = new JoinPredicate(0, Predicate.Op.EQUALS, 0); Join op = new Join(pred, scan1, scan2); op.open(); eqJoin.open(); TestUtil.matchAllTuples(eqJoin, op); }