Fix groupBy method overload return types

Fix groupBy method overload return types