Unit test for Join.rewind()
()
| 75 | * Unit test for Join.rewind() |
| 76 | */ |
| 77 | @Test public void rewind() throws Exception { |
| 78 | JoinPredicate pred = new JoinPredicate(0, Predicate.Op.EQUALS, 0); |
| 79 | Join op = new Join(pred, scan1, scan2); |
| 80 | op.open(); |
| 81 | while (op.hasNext()) { |
| 82 | assertNotNull(op.next()); |
| 83 | } |
| 84 | assertTrue(TestUtil.checkExhausted(op)); |
| 85 | op.rewind(); |
| 86 | |
| 87 | eqJoin.open(); |
| 88 | Tuple expected = eqJoin.next(); |
| 89 | Tuple actual = op.next(); |
| 90 | assertTrue(TestUtil.compareTuples(expected, actual)); |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Unit test for Join.getNext() using a > predicate |
nothing calls this directly
no test coverage detected