Github user jinxing64 commented on the issue: https://github.com/apache/spark/pull/18541 Did a small test: 2000200 rows in the `UnsafeExternalSorter`: 2 spill files(each contains 1000000 rows) and `inMemSorter` contains 200 rows. I want to target the iterator to index=2000001. With this change: `getIterator(2000001)`, it will cost almost 0ms~1ms; Without this change: `for(int i=0; i<2000001; i++)geIterator().loadNext()`, it will cost 300ms;
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org