Repository: spark Updated Branches: refs/heads/master 3c64750bd -> 0a5a46811
Update OpenHashSet.scala Modify wrong comment of function addWithoutResize. Author: ArcherShao <[email protected]> Closes #667 from ArcherShao/patch-3 and squashes the following commits: a607358 [ArcherShao] Update OpenHashSet.scala Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/0a5a4681 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/0a5a4681 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/0a5a4681 Branch: refs/heads/master Commit: 0a5a46811475a7accac1ed8dfefeeba9554456db Parents: 3c64750 Author: ArcherShao <[email protected]> Authored: Tue May 6 10:12:59 2014 -0700 Committer: Reynold Xin <[email protected]> Committed: Tue May 6 10:12:59 2014 -0700 ---------------------------------------------------------------------- .../scala/org/apache/spark/util/collection/OpenHashSet.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/0a5a4681/core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala b/core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala index 19af4f8..4e363b7 100644 --- a/core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala +++ b/core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala @@ -115,10 +115,10 @@ class OpenHashSet[@specialized(Long, Int) T: ClassTag]( * The caller is responsible for calling rehashIfNeeded. * * Use (retval & POSITION_MASK) to get the actual position, and - * (retval & EXISTENCE_MASK) != 0 for prior existence. + * (retval & NONEXISTENCE_MASK) == 0 for prior existence. * * @return The position where the key is placed, plus the highest order bit is set if the key - * exists previously. + * does not exists previously. */ def addWithoutResize(k: T): Int = { var pos = hashcode(hasher.hash(k)) & _mask
