Skip to content

Commit

Permalink
change hashSet name
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-wang committed Jun 11, 2014
1 parent 27579a9 commit b314d5a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,24 +169,24 @@ case class LeftSemiJoinHash(
def execute() = {

buildPlan.execute().zipPartitions(streamedPlan.execute()) { (buildIter, streamIter) =>
val hashTable = new java.util.HashSet[Row]()
val hashSet = new java.util.HashSet[Row]()
var currentRow: Row = null

// Create a Hash set of buildKeys
while (buildIter.hasNext) {
currentRow = buildIter.next()
val rowKey = buildSideKeyGenerator(currentRow)
if(!rowKey.anyNull) {
val keyExists = hashTable.contains(rowKey)
val keyExists = hashSet.contains(rowKey)
if (!keyExists) {
hashTable.add(rowKey)
hashSet.add(rowKey)
}
}
}

val joinKeys = streamSideKeyGenerator()
streamIter.filter(current => {
val joinKeys = streamSideKeyGenerator()
!joinKeys(current).anyNull && hashTable.contains(joinKeys.currentValue)
!joinKeys(current).anyNull && hashSet.contains(joinKeys.currentValue)
})
}
}
Expand Down

0 comments on commit b314d5a

Please sign in to comment.