// Check for using a tuple
if(!this.dataSet.getType().isTupleType()) {
throw new InvalidProgramException("Method maxBy(int) only works on tuples.");
}
return new ReduceOperator<T>(this, new SelectByMaxFunction(
(TupleTypeInfo) this.dataSet.getType(), fields));
}