Record rec = records.next();
Tuple t = rec.getField(1, Tuple.class);
if(first) {
first = false;
rec.copyTo(outRecord);
returnTuple.addAttribute(rec.getField(0, StringValue.class).toString());
}
long tupleQuantity = Long.parseLong(t.getStringValueAt(4));
quantity += tupleQuantity;