Github user hhbyyh commented on a diff in the pull request: https://github.com/apache/spark/pull/19599#discussion_r147562645 --- Diff: mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala --- @@ -224,8 +222,8 @@ class LinearRegression @Since("1.3.0") (@Since("1.3.0") override val uid: String elasticNetParam, fitIntercept, maxIter, regParam, standardization, aggregationDepth) instr.logNumFeatures(numFeatures) - if (($(solver) == Auto && - numFeatures <= WeightedLeastSquares.MAX_NUM_FEATURES) || $(solver) == Normal) { + if (($(solver).equalsIgnoreCase(Auto) && numFeatures <= WeightedLeastSquares.MAX_NUM_FEATURES) + || $(solver).equalsIgnoreCase(Normal)) { --- End diff -- Option 2: Compare StringParam and candidates using `equalsIgnoreCase`. This may be harder for match cases. str match { case s if str.equalsIgnoreCase("HELLO") => }
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org