Skip to content

Commit

Permalink
fix brackets for if-statement
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-wang committed Apr 3, 2015
1 parent 4464f16 commit 95db7ad
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,31 +119,36 @@ case class SortMergeJoin(
currentlMatches = null
var stop: Boolean = false
while (!stop && leftElement != null && rightElement != null) {
if (ordering.compare(leftKey, rightKey) > 0)
if (ordering.compare(leftKey, rightKey) > 0) {
fetchRight()
else if (ordering.compare(leftKey, rightKey) < 0)
} else if (ordering.compare(leftKey, rightKey) < 0) {
fetchLeft()
else
} else {
stop = true
}
}
currentrMatches = new CompactBuffer[Row]()
while (stop && rightElement != null) {
if (!rightKey.anyNull)
if (!rightKey.anyNull) {
currentrMatches += rightElement
}
fetchRight()
if (ordering.compare(leftKey, rightKey) != 0)
if (ordering.compare(leftKey, rightKey) != 0) {
stop = false
}
}
if (currentrMatches.size > 0) {
stop = false
currentlMatches = new CompactBuffer[Row]()
val leftMatch = leftKey.copy()
while (!stop && leftElement != null) {
if (!leftKey.anyNull)
if (!leftKey.anyNull) {
currentlMatches += leftElement
}
fetchLeft()
if (ordering.compare(leftKey, leftMatch) != 0)
if (ordering.compare(leftKey, leftMatch) != 0) {
stop = true
}
}
}

Expand Down

0 comments on commit 95db7ad

Please sign in to comment.