@Override public AbstractAllGroupHeadsCollector<?> createAllGroupCollector() throws IOException { Sort sortWithinGroup = groupSort != null ? groupSort : new Sort(); return new FunctionAllGroupHeadsCollector(groupBy, context, sortWithinGroup); }