I am trying to use flatMapGroupWithState function on spark dataframe to have custom aggregations. In the lambda of flatMapGroupState, I am trying to save List of Row: GroupState