LuciferYang commented on code in PR #43578:
URL: https://github.com/apache/spark/pull/43578#discussion_r1378711532


##########
core/src/test/scala/org/apache/spark/util/TimeStampedHashMapSuite.scala:
##########
@@ -118,18 +118,18 @@ class TimeStampedHashMapSuite extends SparkFunSuite {
       assert(testMap2.iterator.toSeq.head === (("k1", "v1")))
 
       // +
-      val testMap3 = testMap2 + (("k0", "v0"))
+      val testMap3 = testMap2 ++ Map("k0" -> "v0")
       assert(testMap3.size === 2)
       assert(testMap3.get("k1").isDefined)
       assert(testMap3("k1") === "v1")
       assert(testMap3.get("k0").isDefined)
       assert(testMap3("k0") === "v0")
 
       // -
-      val testMap4 = testMap3 - "k0"
-      assert(testMap4.size === 1)
-      assert(testMap4.get("k1").isDefined)
-      assert(testMap4("k1") === "v1")
+      testMap3.remove("k0")

Review Comment:
   
https://github.com/apache/spark/commit/b18d70870a33a4783c6b3b787bef9b0eec30bce0#diff-77b12178a7036c71135074c6ddf7d659e5a69906264d5e3061087e4352e304ed
  introduced this data structure, and most of its use became ineffective after 
https://github.com/apache/spark/pull/126
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to