// appropriately from the input bag
Tuple tuple = inpBag.iterator().next();
Tuple tmpTuple = tupleFactory.newTuple(columns.size());
for (int i = 0; i < columns.size(); i++)
tmpTuple.set(i, tuple.get(columns.get(i)));
outBag = new SingleTupleBag(tmpTuple);
} else {
outBag = bagFactory.newDefaultBag();
for (Tuple tuple : inpBag) {
Tuple tmpTuple = tupleFactory.newTuple(columns.size());
for (int i = 0; i < columns.size(); i++)