Skip to content

Commit

Permalink
tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
GideonPotok committed Jun 5, 2024
1 parent 4f50358 commit 2063e6f
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,13 @@ class OpenHashSet[@specialized(Long, Int, Double, Float) T: ClassTag](
*/
@annotation.nowarn("cat=other-non-cooperative-equals")
private def keyExistsAtPos(k: T, pos: Int) = {
val isItEqual = classTag[T] match {
classTag[T] match {
case ClassTag.Long => _data(pos) equals k
case ClassTag.Int => _data(pos) equals k
case ClassTag.Double => _data(pos) equals k
case ClassTag.Float => _data(pos) equals k
case _ => _data(pos).asInstanceOf[UTF8String].semanticEquals(k.asInstanceOf[UTF8String], 1)
}
// scalastyle:off println
println("keyExistsAtPos: " + k + " == " + _data(pos) +
" ==" + (k == _data(pos)) + "... equals() " +
(k equals _data(pos)) + "... semanticEquals() " +
isItEqual)
// scalastyle:on println
isItEqual
}

/**
Expand Down

0 comments on commit 2063e6f

Please sign in to comment.