huaxingao commented on a change in pull request #29159: URL: https://github.com/apache/spark/pull/29159#discussion_r458561691
########## File path: mllib/src/test/scala/org/apache/spark/ml/util/DefaultReadWriteTest.scala ########## @@ -64,7 +64,12 @@ trait DefaultReadWriteTest extends TempDirectory { self: Suite => case (Array(values), Array(newValues)) => assert(values === newValues, s"Values do not match on param ${p.name}.") case (value, newValue) => - assert(value === newValue, s"Values do not match on param ${p.name}.") + if (value.isInstanceOf[Double] && value.asInstanceOf[Double].isNaN) { Review comment: Before my change, this ```setDefault(strategy -> Imputer.mean, missingValue -> Double.NaN)``` is in Imputer. Now I moved this to ImputerParams so ImputerModel also has the default value of ```missingValue``` set to ```Double.NaN```. In ```DefaultReadWriteTest```, it compares the default value of ```missingValue``` in the original model and the loaded model, so I need to make the NaN comparison work. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org