gengliangwang commented on code in PR #45837:
URL: https://github.com/apache/spark/pull/45837#discussion_r1550496773


##########
mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala:
##########
@@ -271,9 +272,9 @@ class AFTSurvivalRegression @Since("1.6.0") 
(@Since("1.6.0") override val uid: S
         optimizer, initialSolution)
 
     if (rawCoefficients == null) {
-      val msg = s"${optimizer.getClass.getName} failed."
+      val msg = log"${MDC(OPTIMIZER_CLASS_NAME, optimizer.getClass.getName)} 
failed."

Review Comment:
   There are multiple duplicated codes in the changes of this PR. Let's create 
a method to reduce duplications.



-- 
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