Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/21102#discussion_r203315417
--- Diff:
core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala ---
@@ -114,6 +118,21 @@ class OpenHashSet[@specialized(Long, Int) T: ClassTag](
rehashIfNeeded(k, grow, move)
}
+ /**
+ * Remove an element from the set. If an element does not exists in the
set, nothing is done.
+ */
+ def remove(k: T): Unit = {
--- End diff --
If we need to keep an order without duplication, we can implement this by
inroducing another hashset or searching a result array when we try to add an
new element.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]