Also add a comment on why this method exists (to produce a sorted iterator without using any extra memory). This method should definitely be private[spark] at the very least.