Add a test groupby of a struct, fix a bug in the groupby undim