fix the subselect partitioned table with limit or offset