fix no limit on insert by query with non-distributed group by