| 131 | } |
| 132 | |
| 133 | protected Tuple fetchNext() throws TransactionAbortedException, DbException { |
| 134 | if (listIt != null && listIt.hasNext()) { |
| 135 | return processList(); |
| 136 | } |
| 137 | |
| 138 | // loop around child2 |
| 139 | while (child2.hasNext()) { |
| 140 | t2 = child2.next(); |
| 141 | |
| 142 | // if match, create a combined tuple and fill it with the values |
| 143 | // from both tuples |
| 144 | List<Tuple> l = map.get(t2.getField(pred.getField2())); |
| 145 | if (l == null) |
| 146 | continue; |
| 147 | listIt = l.iterator(); |
| 148 | |
| 149 | return processList(); |
| 150 | } |
| 151 | |
| 152 | // child2 is done: advance child1 |
| 153 | child2.rewind(); |
| 154 | if (loadMap()) { |
| 155 | return fetchNext(); |
| 156 | } |
| 157 | |
| 158 | return null; |
| 159 | } |
| 160 | |
| 161 | @Override |
| 162 | public OpIterator[] getChildren() { |