Pipe pruned = new Each( joined, new Fields( "id2" ), new Identity(), Fields.RESULTS );
// pruned = new Checkpoint( pruned );
Pipe merged = new Merge( pruned, rhs );
Pipe grouped = new GroupBy( merged, new Fields( "id2" ) );
// Pipe grouped = new GroupBy( Pipe.pipes( pruned, people ), new Fields( "id2" ) );
Aggregator count = new Count( new Fields( "count" ) );
Pipe counted = new Every( grouped, count );
String testJoinMerge = "testJoinMergeGroupBy/" + ( ( joined instanceof CoGroup ) ? "cogroup" : "hashjoin" );
Tap sink = getPlatform().getDelimitedFile( Fields.ALL, true, "\t", null, getOutputPath( testJoinMerge ), SinkMode.REPLACE );