fix groupBy with implementation from swig-extras