update AggregateBy to use TupleViews where appropriate