MCPcopy Create free account
hub / github.com/1345414527/MIT6.830 / fetchNext

Method fetchNext

src/java/simpledb/execution/HashEquiJoin.java:133–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 9

processListMethod · 0.95
loadMapMethod · 0.95
getMethod · 0.80
getField2Method · 0.80
hasNextMethod · 0.65
nextMethod · 0.65
iteratorMethod · 0.65
rewindMethod · 0.65
getFieldMethod · 0.45

Tested by

no test coverage detected