The reason why commit-before does not clear the group is because it's committing the last but one value (therefore we already have a new value for that group).
This does not hold when the group is committed because of an incoming tuple assigned to another group.
This also solve the issue of ever increasing group size due to grouping by non-factors.
The issue remain when local_last_out is used though: the groups must be kept forever, so we should make sure we group by factors only in that case.
The reason why commit-before does not clear the group is because it's committing the last but one value (therefore we already have a new value for that group). This does not hold when the group is committed because of an incoming tuple assigned to another group.
This also solve the issue of ever increasing group size due to grouping by non-factors.
The issue remain when local_last_out is used though: the groups must be kept forever, so we should make sure we group by factors only in that case.