Affects Version/s: None
Fix Version/s: 1.12.0
if the groupKey is also used in some aggregate function,
the field mapping of top level aggregate would be messy.
Bad cases are:
or a more complex case:
I have fixed these cases, and will provide a patch later after more tests.