PTypeFamily ptf = ptype.getFamily();
if (cols.length == 1) {
byFn = new SingleKeyFn(cols[0]);
keyPType = pt.get(cols[0]);
} else {
TupleFactory tf = null;
switch (cols.length) {
case 2:
tf = TupleFactory.PAIR;
keyPType = ptf.pairs(pt.get(cols[0]), pt.get(cols[1]));
break;