What's the difference between takeOrdered and sortBy + take in pySpark?

Viewed 31

If I want to get the sorted top-k values of some RDD, what's the difference between takeOrdered function and sortBy + take function? Is the previous one faster?

0 Answers
Related