Skip to content

Commit 1ad873e

Browse files
committed
Change hasNext logic back to the correct version.
1 parent 8e6f2a2 commit 1ad873e

File tree

1 file changed

+2
-5
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/execution

1 file changed

+2
-5
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/joins.scala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,8 @@ case class HashJoin(
9292
private[this] val joinKeys = streamSideKeyGenerator()
9393

9494
override final def hasNext: Boolean =
95-
if (currentMatchPosition != -1) {
96-
currentMatchPosition < currentHashMatches.size
97-
} else {
98-
fetchNext()
99-
}
95+
(currentMatchPosition != -1 && currentMatchPosition < currentHashMatches.size) ||
96+
(streamIter.hasNext && fetchNext())
10097

10198
override final def next() = {
10299
val ret = joinRow(currentStreamedRow, currentHashMatches(currentMatchPosition))

0 commit comments

Comments
 (0)