public static <K1, K2, V> PTable<K2, V> mapKeys(String name, PTable<K1, V> ptable, MapFn<K1, K2> mapFn,
PType<K2> ptype) {
PTypeFamily ptf = ptable.getTypeFamily();
return ptable.parallelDo(name,
new PairMapFn<K1, V, K2, V>(mapFn, IdentityFn.<V>getInstance()),
ptf.tableOf(ptype, ptable.getValueType()));
}
/**
* Maps a {@code PTable<K, U>} to a {@code PTable<K, V>} using the given {@code MapFn<U, V>} on
* the values of the {@code PTable}.