while (sortedInputs[i].size() > 0) {
Datum g = sortedInputs[i].get(0)[0];
Tuple t = (Tuple) sortedInputs[i].get(0)[1];
if (g.compareTo(smallestGroup) < 0) {
sortedInputs[i].remove(0); // discard this tuple
} else if (g.equals(smallestGroup)) {
b.add(t);
//if (lineageTracer != null) lineageTracer.union(t, output); // update lineage
if (lineageTracer != null) {