Ngone51 commented on a change in pull request #27246:
URL: https://github.com/apache/spark/pull/27246#discussion_r443429518
##########
File path:
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java
##########
@@ -703,6 +702,7 @@ public boolean hasNext() {
@Override
public void loadNext() throws IOException {
+ initializeNumRecords();
while (!current.hasNext() && !iterators.isEmpty()) {
current = iterators.remove();
}
Review comment:
Instead of calling `this.hasNext()`, we can extract the same lines into
an inline function? e.g. `nextIterator`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]