Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor refactoring
  • Loading branch information
kiszk committed Aug 4, 2018
commit e31f7e67acc4bd41adeff59f237bc7d526aeae07
Original file line number Diff line number Diff line change
Expand Up @@ -4537,9 +4537,7 @@ object ArrayIntersect {
if (!alreadySeenNull) {
var j = 0
while (!found && j < array1.numElements()) {
if (array1.isNullAt(j)) {
found = true
}
found = array1.isNullAt(j)
j += 1
}
// array1 is scaned only once for null element
Expand All @@ -4556,14 +4554,10 @@ object ArrayIntersect {
var k = 0
while (!foundArrayBuffer && k < arrayBuffer.size) {
val va = arrayBuffer(k)
if (va != null && ordering.equiv(va, elem1)) {
foundArrayBuffer = true
}
foundArrayBuffer = (va != null) && ordering.equiv(va, elem1)
k += 1
}
if (!foundArrayBuffer) {
found = true
}
found = !foundArrayBuffer
}
}
j += 1
Expand Down