dongjoon-hyun commented on a change in pull request #25303: [SPARK-23469] 
HashingTF should use corrected MurmurHash3 implementation
URL: https://github.com/apache/spark/pull/25303#discussion_r308947003
 
 

 ##########
 File path: 
mllib/src/test/scala/org/apache/spark/ml/feature/HashingTFSuite.scala
 ##########
 @@ -83,11 +83,24 @@ class HashingTFSuite extends MLTest with 
DefaultReadWriteTest {
       .setInputCol("words")
       .setOutputCol("features")
       .setNumFeatures(n)
-    val mLlibHashingTF = new MLlibHashingTF(n)
-    assert(hashingTF.indexOf("a") === mLlibHashingTF.indexOf("a"))
-    assert(hashingTF.indexOf("b") === mLlibHashingTF.indexOf("b"))
-    assert(hashingTF.indexOf("c") === mLlibHashingTF.indexOf("c"))
-    assert(hashingTF.indexOf("d") === mLlibHashingTF.indexOf("d"))
+    assert(hashingTF.indexOf("a") === 67)
+    assert(hashingTF.indexOf("b") === 65)
+    assert(hashingTF.indexOf("c") === 68)
+    assert(hashingTF.indexOf("d") === 90)
+  }
+
+  test("Load HashingTF prior to Spark 3.0") {
 
 Review comment:
   Since this is a compatibility bug fix, could you add SPARK-23469 prefix?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to