rm maintainIndices for groupBy and sort