Support InMemory Sort and Group By.